Skip to content

Commit

Permalink
perf/x86/intel/uncore: Fix the build on !CONFIG_PHYS_ADDR_T_64BIT
Browse files Browse the repository at this point in the history
'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 <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Mar 3, 2022
1 parent cedd361 commit 02a08d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/x86/events/intel/uncore_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static int parse_discovery_table(struct pci_dev *dev, int die,
void __iomem *io_addr;
resource_size_t addr;
unsigned long size;
u32 val, val2;
u32 val;
int i;

pci_read_config_dword(dev, bar_offset, &val);
Expand All @@ -221,6 +221,8 @@ static int parse_discovery_table(struct pci_dev *dev, int die,
addr = (resource_size_t)(val & PCI_BASE_ADDRESS_MEM_MASK);
#ifdef CONFIG_PHYS_ADDR_T_64BIT
if ((val & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64) {
u32 val2;

pci_read_config_dword(dev, bar_offset + 4, &val2);
addr |= ((resource_size_t)val2) << 32;
}
Expand Down

0 comments on commit 02a08d7

Please sign in to comment.