'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>
void __iomem *io_addr;
resource_size_t addr;
unsigned long size;
void __iomem *io_addr;
resource_size_t addr;
unsigned long size;
int i;
pci_read_config_dword(dev, bar_offset, &val);
int i;
pci_read_config_dword(dev, bar_offset, &val);
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) {
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) {
pci_read_config_dword(dev, bar_offset + 4, &val2);
addr |= ((resource_size_t)val2) << 32;
}
pci_read_config_dword(dev, bar_offset + 4, &val2);
addr |= ((resource_size_t)val2) << 32;
}