linux/include/trace
Steven Rostedt (Google) 487a086595 tracing: Use alignof__(struct {type b;}) instead of offsetof()
commit 09794a5a6c upstream.

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>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 07:22:48 +01:00
..
events btrfs: fix trace event name typo for FLUSH_DELAYED_REFS 2023-01-24 07:22:41 +01:00
bpf_probe.h tracing: Add '__rel_loc' using trace event macros 2022-08-17 14:24:26 +02:00
define_trace.h
perf.h tracing/perf: Avoid -Warray-bounds warning for __rel_loc macro 2022-08-17 14:24:30 +02:00
syscall.h
trace_events.h tracing: Use alignof__(struct {type b;}) instead of offsetof() 2023-01-24 07:22:48 +01:00