diff options
author | Steven Rostedt (Google) <[email protected]> | 2022-08-02 15:44:12 -0400 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2022-08-02 16:01:12 -0400 |
commit | 09794a5a6c348f629b35fc1687071a1622ef4265 (patch) | |
tree | cf06a8c4d6061eefc4b7689c58da07472e88f5cd /scripts | |
parent | 2f63e5d2e391837c70741311b5b70d2fbd15d138 (diff) |
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/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Suggested-by: David Laight <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions