diff options
author | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-08-02 22:44:12 +0300 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-08-02 23:01:12 +0300 |
commit | 09794a5a6c348f629b35fc1687071a1622ef4265 (patch) | |
tree | cf06a8c4d6061eefc4b7689c58da07472e88f5cd /arch | |
parent | 2f63e5d2e391837c70741311b5b70d2fbd15d138 (diff) | |
download | linux-09794a5a6c348f629b35fc1687071a1622ef4265.tar.xz |
tracing: Use alignof__(struct {type b;}) instead of offsetof()
Simplify:
#define ALIGN_STRUCTFIELD(type) ((int)(offsetof(struct {char a; type b;}, b)))
with
#define ALIGN_STRUCTFIELD(type) __alignof__(struct {type b;})
Which works just the same.
Link: https://lore.kernel.org/all/a7d202457150472588df0bd3b7334b3f@AcuMS.aculab.com/
Link: https://lkml.kernel.org/r/20220802154412.513c50e3@gandalf.local.home
Suggested-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions