From: Matt Fleming <matt@codeblueprint.co.uk>
To: Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
Matt Fleming <matt@codeblueprint.co.uk>
Subject: [PATCH 1/5] ia64/PCI: Fix incorrect PCI resource end address
Date: Wed, 04 May 2016 11:17:46 +0000 [thread overview]
Message-ID: <1462360670-27993-2-git-send-email-matt@codeblueprint.co.uk> (raw)
In-Reply-To: <1462360670-27993-1-git-send-email-matt@codeblueprint.co.uk>
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
next prev parent reply other threads:[~2016-05-04 11:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 11:17 [PATCH 0/5] ia64: Fix compiler warnings Matt Fleming
2016-05-04 11:17 ` Matt Fleming [this message]
2016-05-04 11:17 ` [PATCH 2/5] ia64/PCI: Remove unused 'addr' and fix build warning Matt Fleming
2016-05-04 11:17 ` [PATCH 3/5] ia64: Reduce stack usage by iterating over nodemask Matt Fleming
2016-05-04 11:17 ` [PATCH 4/5] ia64/traps: Silence GCC warning about uninitialised variable Matt Fleming
2016-05-04 11:17 ` [PATCH 5/5] ia64/unaligned: Silence another GCC warning about an " Matt Fleming
2016-05-05 19:59 ` [PATCH 0/5] ia64: Fix compiler warnings Luck, Tony
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=1462360670-27993-2-git-send-email-matt@codeblueprint.co.uk \
--to=matt@codeblueprint.co.uk \
--cc=fenghua.yu@intel.com \
--cc=helgaas@kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/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).