Skip to content

Commit 02a08d7

Browse files
author
Ingo Molnar
committed
perf/x86/intel/uncore: Fix the build on !CONFIG_PHYS_ADDR_T_64BIT
'val2' is unused if !CONFIG_PHYS_ADDR_T_64BIT: arch/x86/events/intel/uncore_discovery.c:213:18: error: unused variable ‘val2’ [-Werror=unused-variable] Signed-off-by: Ingo Molnar <[email protected]>
1 parent cedd361 commit 02a08d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/events/intel/uncore_discovery.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static int parse_discovery_table(struct pci_dev *dev, int die,
210210
void __iomem *io_addr;
211211
resource_size_t addr;
212212
unsigned long size;
213-
u32 val, val2;
213+
u32 val;
214214
int i;
215215

216216
pci_read_config_dword(dev, bar_offset, &val);
@@ -221,6 +221,8 @@ static int parse_discovery_table(struct pci_dev *dev, int die,
221221
addr = (resource_size_t)(val & PCI_BASE_ADDRESS_MEM_MASK);
222222
#ifdef CONFIG_PHYS_ADDR_T_64BIT
223223
if ((val & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64) {
224+
u32 val2;
225+
224226
pci_read_config_dword(dev, bar_offset + 4, &val2);
225227
addr |= ((resource_size_t)val2) << 32;
226228
}

0 commit comments

Comments
 (0)