From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, sfr@canb.auug.org.au,
hpa@zytor.com, tglx@linuxtronic.de
Subject: [PATCH] perf/x86/uncore: fix compilation warning in snb_uncore_imc_init_box()
Date: Tue, 11 Mar 2014 11:44:33 +0100 [thread overview]
Message-ID: <20140311104433.GA16207@quad> (raw)
This patches fixes a compilation problem (unused variable) with the
new SNB/IVB/HSW uncore IMC code.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Stephane Eranian <eranian@google.com>
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index b262c61..3846a37 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -1722,15 +1722,19 @@ static struct attribute_group snb_uncore_imc_format_group = {
static void snb_uncore_imc_init_box(struct intel_uncore_box *box)
{
struct pci_dev *pdev = box->pci_dev;
- u32 addr_lo, addr_hi;
+ u32 addr_lo;
resource_size_t addr;
pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET, &addr_lo);
addr = addr_lo;
#ifdef CONFIG_PHYS_ADDR_T_64BIT
- pci_read_config_dword(pdev, SNB_UNCORE_PCI_IMC_BAR_OFFSET+4, &addr_hi);
- addr = ((resource_size_t)addr_hi << 32) | addr_lo;
+ { u32 addr_hi;
+ int where = SNB_UNCORE_PCI_IMC_BAR_OFFSET + 4;
+
+ pci_read_config_dword(pdev, where, &addr_hi);
+ addr = ((resource_size_t)addr_hi << 32) | addr_lo;
+ }
#endif
addr &= ~(PAGE_SIZE - 1);
next reply other threads:[~2014-03-11 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 10:44 Stephane Eranian [this message]
2014-03-11 11:13 ` [PATCH] perf/x86/uncore: fix compilation warning in snb_uncore_imc_init_box() Peter Zijlstra
2014-03-11 11:24 ` Stephane Eranian
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=20140311104433.GA16207@quad \
--to=eranian@google.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linuxtronic.de \
/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