public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>,
	Joe Perches <joe@perches.com>
Subject: Re: [GIT PULL] treewide conversion to sizeof_member() for v5.4-rc1
Date: Fri, 27 Sep 2019 09:57:00 +0300	[thread overview]
Message-ID: <20190927065700.GA2215@avx2> (raw)
In-Reply-To: <CAHk-=wg8+eNK+SK1Ekqm0qNQHVM6e6YOdZx3yhsX6Ajo3gEupg@mail.gmail.com>

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.

      parent reply	other threads:[~2019-09-27  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 17:33 [GIT PULL] treewide conversion to sizeof_member() for v5.4-rc1 Kees Cook
2019-09-26 20:06 ` Linus Torvalds
2019-09-26 20:56   ` Kees Cook
2019-10-02 18:19     ` renaming FIELD_SIZEOF to sizeof_member (was Re: [GIT PULL] treewide conversion to sizeof_member() for v5.4-rc1) Kees Cook
2019-10-02 20:21       ` renaming FIELD_SIZEOF to sizeof_member David Miller
2019-10-02 20:53         ` Kees Cook
2019-09-27  6:57   ` Alexey Dobriyan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190927065700.GA2215@avx2 \
    --to=adobriyan@gmail.com \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox