This is done to shorten line length in the function in preparation for adding further usages of the vpci_bar data structure.
No functional change. Signed-off-by: Roger Pau Monné <[email protected]> --- xen/drivers/vpci/header.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c index a1c928a0d2..eb9219a49a 100644 --- a/xen/drivers/vpci/header.c +++ b/xen/drivers/vpci/header.c @@ -103,24 +103,26 @@ static void modify_decoding(const struct pci_dev *pdev, uint16_t cmd, for ( i = 0; i < ARRAY_SIZE(header->bars); i++ ) { - if ( !MAPPABLE_BAR(&header->bars[i]) ) + struct vpci_bar *bar = &header->bars[i]; + + if ( !MAPPABLE_BAR(bar) ) continue; - if ( rom_only && header->bars[i].type == VPCI_BAR_ROM ) + if ( rom_only && bar->type == VPCI_BAR_ROM ) { unsigned int rom_pos = (i == PCI_HEADER_NORMAL_NR_BARS) ? PCI_ROM_ADDRESS : PCI_ROM_ADDRESS1; - uint32_t val = header->bars[i].addr | + uint32_t val = bar->addr | (map ? PCI_ROM_ADDRESS_ENABLE : 0); - header->bars[i].enabled = header->rom_enabled = map; + bar->enabled = header->rom_enabled = map; pci_conf_write32(pdev->sbdf, rom_pos, val); return; } if ( !rom_only && - (header->bars[i].type != VPCI_BAR_ROM || header->rom_enabled) ) - header->bars[i].enabled = map; + (bar->type != VPCI_BAR_ROM || header->rom_enabled) ) + bar->enabled = map; } if ( !rom_only ) -- 2.37.3
