lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] treewide conversion to sizeof_member() for v5.4-rc1
On Thu, Sep 26, 2019 at 01:06:01PM -0700, Linus Torvalds wrote:
> On Thu, Sep 26, 2019 at 10:33 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > Please pull this mostly mechanical treewide conversion to the single and
> > more accurately named sizeof_member() macro for the end of v5.4-rc1. This
> > replaces 3 macros of the same behavior (FIELD_SIZEOF(), SIZEOF_FIELD(),
> > and sizeof_field()). The last patch in the series has a script in the
> > commit log to do the conversion, if you want to compare the results
> > (they remained identical today when I checked).
>
> Honestly, I'm not sure why "sizeof_field()" wasn't just picked when we
> already had it. Making a new macro for the exact same thing seems
> somewhat questionable.
>
> Yes, yes, the C standard calls them "members". Except when it doesn't,
> and they are members of a bit type, and it calls them bit-fields.

It does, but neither typeof nor sizeof work on bitfields.

\
 
 \ /
  Last update: 2019-09-27 08:57    [W:0.061 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site