Unified sizeof_member() Re-Proposed For Linux 5.5
After not being merged for Linux 5.4, the new sizeof_member() macro as a unified means of calculating the size of a member of a struct has been volleyed for Linux 5.5 for possible inclusion on this last day of the merge window.
The Linux kernel to now has supported SIZEOF_FIELD, FIELD_SIZEOF, sizeof_field as means of calculating the size of a member of a C struct... The new sizeof_member looks to clean-up that code cruft that has accumulated over the years with converting all usage of the old macros over to this new unified macro.
Linus Torvalds didn't end up pulling the sizeof_member for Linux 5.4 and initially wasn't sure of the "size of member" name with the older approaches all being based off "size of field", but Google's Kees Cook has re-submitted the latest tree-wide conversion for Linux 5.5.
The pull request is pending while waiting to see if Linus honors it for this cycle prior to shipping Linux 5.5-rc1 tonight.
The Linux kernel to now has supported SIZEOF_FIELD, FIELD_SIZEOF, sizeof_field as means of calculating the size of a member of a C struct... The new sizeof_member looks to clean-up that code cruft that has accumulated over the years with converting all usage of the old macros over to this new unified macro.
Linus Torvalds didn't end up pulling the sizeof_member for Linux 5.4 and initially wasn't sure of the "size of member" name with the older approaches all being based off "size of field", but Google's Kees Cook has re-submitted the latest tree-wide conversion for Linux 5.5.
The pull request is pending while waiting to see if Linus honors it for this cycle prior to shipping Linux 5.5-rc1 tonight.
15 Comments