Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1621509 > unrolled thread
| Started by | Matthias Kaehlcke <mka@chromium.org> |
|---|---|
| First post | 2017-04-11 20:00 +0200 |
| Last post | 2017-04-14 21:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant Matthias Kaehlcke <mka@chromium.org> - 2017-04-11 20:00 +0200
Re: [PATCH v2] PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant Bjorn Helgaas <helgaas@kernel.org> - 2017-04-14 17:50 +0200
Re: [PATCH v2] PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant Matthias Kaehlcke <mka@chromium.org> - 2017-04-14 21:40 +0200
| From | Matthias Kaehlcke <mka@chromium.org> |
|---|---|
| Date | 2017-04-11 20:00 +0200 |
| Subject | [PATCH v2] PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant |
| Message-ID | <tv8f8-1JB-7@gated-at.bofh.it> |
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) #define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ -- 2.12.2.715.g7642488e1d-goog
[toc] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2017-04-14 17:50 +0200 |
| Message-ID | <twbDX-2Q9-13@gated-at.bofh.it> |
| In reply to | #1621509 |
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()? If so, can you do that in the same patch? > #define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ > > -- > 2.12.2.715.g7642488e1d-goog >
[toc] | [prev] | [next] | [standalone]
| From | Matthias Kaehlcke <mka@chromium.org> |
|---|---|
| Date | 2017-04-14 21:40 +0200 |
| Message-ID | <twfey-57t-11@gated-at.bofh.it> |
| In reply to | #1623733 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web