Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1620817
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] PCI: Add cast when assigning PCI_ROM_ADDRESS_MASK to a 32-bit variable |
| Date | 2017-04-11 03:30 +0200 |
| Message-ID | <tuSN3-dA-7@gated-at.bofh.it> (permalink) |
| References | <tuPYS-6Qk-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Apr 10, 2017 at 03:24:57PM -0700, Matthias Kaehlcke wrote:
> This fixes a clang warning about "implicit conversion from 'unsigned
> long' to 'u32'"
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> drivers/pci/probe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index dfc9a2794141..148e80d5caf1 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -180,7 +180,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
> u16 orig_cmd;
> struct pci_bus_region region, inverted_region;
>
> - mask = type ? PCI_ROM_ADDRESS_MASK : ~0;
> + mask = type ? (u32)PCI_ROM_ADDRESS_MASK : ~0;
Can we put the cast in the PCI_ROM_ADDRESS_MASK #define so we don't have to
repeat it in all the uses?
> /* No printks while decoding is disabled! */
> if (!dev->mmio_always_on) {
> --
> 2.12.2.715.g7642488e1d-goog
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] PCI: Add cast when assigning PCI_ROM_ADDRESS_MASK to a 32-bit variable Matthias Kaehlcke <mka@chromium.org> - 2017-04-11 00:30 +0200
Re: [PATCH] PCI: Add cast when assigning PCI_ROM_ADDRESS_MASK to a 32-bit variable Bjorn Helgaas <helgaas@kernel.org> - 2017-04-11 03:30 +0200
Re: [PATCH] PCI: Add cast when assigning PCI_ROM_ADDRESS_MASK to a 32-bit variable Mason <slash.tmp@free.fr> - 2017-04-11 12:10 +0200
Re: [PATCH] PCI: Add cast when assigning PCI_ROM_ADDRESS_MASK to a 32-bit variable Matthias Kaehlcke <mka@chromium.org> - 2017-04-11 19:30 +0200
Re: [PATCH] PCI: Add cast when assigning PCI_ROM_ADDRESS_MASK to a 32-bit variable Mason <slash.tmp@free.fr> - 2017-04-11 19:30 +0200
csiph-web