linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mason <slash.tmp@free.fr>, Grant Grundler <grundler@chromium.org>,
	Greg Hackmann <ghackmann@google.com>,
	Michael Davidson <md@google.com>
Subject: Re: [PATCH v2] PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant
Date: Fri, 14 Apr 2017 12:36:05 -0700	[thread overview]
Message-ID: <20170414193605.GN28657@google.com> (raw)
In-Reply-To: <20170414154340.GA5864@bhelgaas-glaptop.roam.corp.google.com>

El Fri, Apr 14, 2017 at 10:43:40AM -0500 Bjorn Helgaas ha dit:

> On Tue, Apr 11, 2017 at 10:56:58AM -0700, Matthias Kaehlcke wrote:
> > A 64-bit value is not needed since a PCI ROM address consists in 32 bits.
> > This fixes a clang warning about "implicit conversion from 'unsigned
> > long' to 'u32'".
> > 
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> > Changes in v2:
> > - Define PCI_ROM_ADDRESS_MASK as a 32-bit constant instead of using a cast
> > - Updated commit message
> > 
> >  include/uapi/linux/pci_regs.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
> > index 634c9c44ed6c..fff521c9458c 100644
> > --- a/include/uapi/linux/pci_regs.h
> > +++ b/include/uapi/linux/pci_regs.h
> > @@ -114,7 +114,7 @@
> >  #define PCI_SUBSYSTEM_ID	0x2e
> >  #define PCI_ROM_ADDRESS		0x30	/* Bits 31..11 are address, 10..1 reserved */
> >  #define  PCI_ROM_ADDRESS_ENABLE	0x01
> > -#define PCI_ROM_ADDRESS_MASK	(~0x7ffUL)
> > +#define PCI_ROM_ADDRESS_MASK	(~0x7ffU)
> 
> Does this mean we can remove the "(u32)" casts in __pci_read_base() and
> pci_std_update_resource()?

Indeed

> If so, can you do that in the same patch?

Will do

Matthias

      reply	other threads:[~2017-04-14 19:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 17:56 [PATCH v2] PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant Matthias Kaehlcke
2017-04-14 15:43 ` Bjorn Helgaas
2017-04-14 19:36   ` Matthias Kaehlcke [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=20170414193605.GN28657@google.com \
    --to=mka@chromium.org \
    --cc=bhelgaas@google.com \
    --cc=ghackmann@google.com \
    --cc=grundler@chromium.org \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=md@google.com \
    --cc=slash.tmp@free.fr \
    /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).