diff options
author | Matt Fleming <matt@codeblueprint.co.uk> | 2016-05-04 07:17:46 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2016-05-05 13:29:13 -0400 |
commit | 18c25526c9cd4041e8e5acba811cffa606c175b7 (patch) | |
tree | 478ce94500a962a1ac3e29ffbc54a7303f625511 /arch/ia64/sn | |
parent | e298c499cac1f175694f4ccfe5b532e5098b4716 (diff) |
ia64/PCI: Fix incorrect PCI resource end address
commit f976721e826e ("ia64/PCI: Use ioremap() instead of open-coded
equivalent") introduced the following compiler warning,
arch/ia64/sn/kernel/io_init.c: In function 'sn_io_slot_fixup':
arch/ia64/sn/kernel/io_init.c:189:19: warning: 'addr' may be used uninitialized in this function [-Wmaybe-uninitialized]
res->end = addr + size;
^
'addr' is indeed uninitialised and the correct value to use is
res->start.
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn')
-rw-r--r-- | arch/ia64/sn/kernel/io_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c index c15a41e2d1f2..d63809a6adfa 100644 --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c | |||
@@ -151,7 +151,7 @@ sn_io_slot_fixup(struct pci_dev *dev) | |||
151 | { | 151 | { |
152 | int idx; | 152 | int idx; |
153 | struct resource *res; | 153 | struct resource *res; |
154 | unsigned long addr, size; | 154 | unsigned long size; |
155 | struct pcidev_info *pcidev_info; | 155 | struct pcidev_info *pcidev_info; |
156 | struct sn_irq_info *sn_irq_info; | 156 | struct sn_irq_info *sn_irq_info; |
157 | int status; | 157 | int status; |
@@ -186,7 +186,7 @@ sn_io_slot_fixup(struct pci_dev *dev) | |||
186 | continue; | 186 | continue; |
187 | 187 | ||
188 | res->start = pcidev_info->pdi_pio_mapped_addr[idx]; | 188 | res->start = pcidev_info->pdi_pio_mapped_addr[idx]; |
189 | res->end = addr + size; | 189 | res->end = res->start + size; |
190 | 190 | ||
191 | /* | 191 | /* |
192 | * if it's already in the device structure, remove it before | 192 | * if it's already in the device structure, remove it before |