Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1394153 > unrolled thread
| Started by | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| First post | 2016-05-04 13:20 +0200 |
| Last post | 2016-05-04 13:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/5] ia64/PCI: Fix incorrect PCI resource end address Matt Fleming <matt@codeblueprint.co.uk> - 2016-05-04 13:20 +0200
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Date | 2016-05-04 13:20 +0200 |
| Subject | [PATCH 1/5] ia64/PCI: Fix incorrect PCI resource end address |
| Message-ID | <rv30u-2OD-7@gated-at.bofh.it> |
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>
---
arch/ia64/sn/kernel/io_init.c | 4 ++--
1 file 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)
{
int idx;
struct resource *res;
- unsigned long addr, size;
+ unsigned long size;
struct pcidev_info *pcidev_info;
struct sn_irq_info *sn_irq_info;
int status;
@@ -186,7 +186,7 @@ sn_io_slot_fixup(struct pci_dev *dev)
continue;
res->start = pcidev_info->pdi_pio_mapped_addr[idx];
- res->end = addr + size;
+ res->end = res->start + size;
/*
* if it's already in the device structure, remove it before
--
2.7.3
Back to top | Article view | linux.kernel
csiph-web