mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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]>