[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190927065700.GA2215@avx2>
Date: Fri, 27 Sep 2019 09:57:00 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Kees Cook <keescook@...omium.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@...el.com>,
Joe Perches <joe@...ches.com>
Subject: Re: [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@...omium.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.
Powered by blists - more mailing lists