linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 4/4] CPER: Remove unnecessary use of user-space types
Date: Tue, 26 Mar 2019 04:56:05 +0900	[thread overview]
Message-ID: <20190325195605.GA21965@kroah.com> (raw)
In-Reply-To: <20190325182608.GS251185@google.com>

On Mon, Mar 25, 2019 at 01:26:08PM -0500, Bjorn Helgaas wrote:
> On Mon, Mar 25, 2019 at 01:14:25PM -0500, helgaas@kernel.org wrote:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> > 
> > "__u32" and similar types are intended for things exported to user-space,
> > including structs used in ioctls; see include/uapi/asm-generic/int-l64.h.
> > 
> > They are not needed for the CPER struct definitions, which not exported to
> > user-space and not used in ioctls.  Replace them with the typical "u32" and
> > similar types.  No functional change intended.
> > 
> > The reason for changing this is to remove the question of "why do we use
> > __u32 here instead of u32?"  We should use __u32 when there's a reason for
> > it; otherwise, we should prefer u32 for consistency.
> > 
> > Reference: Documentation/process/coding-style.rst
> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > CC: Masahiro Yamada <yamada.masahiro@socionext.com>
> > CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > CC: Andrew Morton <akpm@linux-foundation.org>
> 
> I cc'd you folks because you were part of this conversation:
> 
>   https://lore.kernel.org/lkml/1526350925-14922-3-git-send-email-yamada.masahiro@socionext.com/T/#u
> 
> I *think* the conclusion there was that this sort of change makes
> sense, but I want to make sure.  If it does make sense, I'm surprised
> at how much stuff in include/linux/ still uses __u32 when it doesn't
> appear to need it.

People just cut/paste and don't think about it.  We used to have a bunch
of known structures that didn't use __u32 and friends as people didn't
realize it, so it doesn't surprise me that the other way is also the
case :(

greg k-h

  parent reply	other threads:[~2019-03-25 20:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 18:14 [PATCH 0/4] PCI, CPER: Trivial cleanups helgaas
2019-03-25 18:14 ` [PATCH 1/4] PCI: Cleanup register definition width and whitespace helgaas
2019-03-25 18:14 ` [PATCH 2/4] PCI: Fix comment typos helgaas
2019-03-30 17:56   ` Mukesh Ojha
2019-04-01 13:43     ` Bjorn Helgaas
2019-03-25 18:14 ` [PATCH 3/4] CPER: Add UEFI spec references helgaas
2019-03-25 18:14 ` [PATCH 4/4] CPER: Remove unnecessary use of user-space types helgaas
2019-03-25 18:26   ` Bjorn Helgaas
2019-03-25 19:13     ` Joe Perches
2019-03-25 19:56     ` Greg Kroah-Hartman [this message]
2019-03-30 12:52     ` Masahiro Yamada
2019-03-27 13:56 ` [PATCH 0/4] PCI, CPER: Trivial cleanups Bjorn Helgaas

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=20190325195605.GA21965@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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;
as well as URLs for NNTP newsgroup(s).