Messages in this thread | | | Date | Mon, 1 Aug 2022 17:08:06 -0400 | From | Steven Rostedt <> | Subject | Re: [for-next][PATCH 21/21] tracing: Use a struct alignof to determine trace event field alignment |
| |
On Mon, 1 Aug 2022 07:46:22 +0000 David Laight <David.Laight@ACULAB.COM> wrote:
> > Define a macro as: > > > > ALIGN_STRUCTFIELD(type) ((int)(offsetof(struct {char a; type b;}, b))) > > > > which gives the actual alignment of types in a structure. > > The simpler: > __alignof__(struct {type b;}) > also works.
I'll have to try that out.
For now, as the previous version made it through all my tests, I may be pushing it, but change it to this for simplicity if that also works and passes all my test.
Thanks,
-- Steve
| |