[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-4.17 v2 3/5] vpci: introduce a local vpci_bar variable to modify_decoding()
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 25 Oct 2022 16:44:16 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XzCg1pMR0cq2iQiX6KNWMZbBy7hPZyi/638lZv3TX6Y=; b=PER7v8ikKMrvr1BOAo7Uh47RuN64KzzULnayJHmFtD5dzCMPogdtjQRhOypdgZdLZRCgp6gSZQhqimr/0lMOhqTNK7SdD7wY7zyHmg03mg5Tfb9SPFxEV0F7qvJ9PAwsnaNSe3KHU+HoWiIsSNYlZIntWP1ZaLxzYxjDC5LRpxS1EhdUYvQNvNgsVdCBzRc+GpnpU8lrsOz30lFgv4MXI4fM6XbzEi1zSPQUgJnolT4cf49dGPLgBdBeeZkWGLGFq6y2S9dxHWEpOEAfgugUZIgisrG/zkiyhcupHDAnIgKHy35U/1gh+XhiV6lO1RFqIB+TEv0wD2PAKo14uf4TYQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MXC1HwZlbb0htukKNOx1rt5In+5eddZUigIsEz+JkeRzbwXG8h1zQ7DI+ZLjF6v10m94mQXGEizXqL8NNUtupTOxYb7FnkscPK3VhIEJfodW6A1Sp2Jy9cBwSSL7LsiWt+Xv9+ouA3TrsSB7qW3PX3K3RqzycDrZ2/wC7pI44qYNxFUvLhbke8pPl+WP1riiHq0FD4DIL0cXPMLvl2Z4bpyy9/ClM8Agf0+dNpZoO+Y9BCB79IONEyJhFpCrm3+oeNuMJdXmtocVXQ8X/0cq/5+n60mFJzb3jzi8VShRL3CMQe/JjUXJlM03M2HfNsmErEt/V6ek6l2Rx8kWJQ4nGQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Henry.Wang@xxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Tue, 25 Oct 2022 14:44:58 +0000
- Ironport-data: A9a23:LuUh+6NLkB4Un2bvrR2GlsFynXyQoLVcMsEvi/4bfWQNrUongTFRn 2oeWjrVM62NMzDzcohyYIzi9UMDv5CDm9VgHAto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6j+fQLlbFILasEjhrQgN5QzsWhxtmmuoo6qZlmtH8CA6W0 T/Ii5S31GSNhnglbwr414rZ8Ek15ayo5WtC1rADTasjUGH2xiF94K03fcldH1OgKqFIE+izQ fr0zb3R1gs1KD90V7tJOp6iGqE7aua60Tqm0xK6aID76vR2nQQg075TCRYpQRw/ZwNlPTxG4 I4lWZSYEW/FN0BX8QgXe0Ew/ypWZcWq9FJbSJQWXAP6I0DuKhPRL/tS4E4eJ44cxsxtG2ty0 9MUJS4wYkGZn8Gq+efuIgVsrpxLwMjDGqo64ygl5haASPEsTNbEXrnA4sJe0HEonMdSEP3CZ s0fLz1ycBDHZB4JMVASYH48tL7w2j+jLHsF9hTM+vJfD2v7lWSd1JD3N9XYYJqSTNh9lUeEv GPWuW/+B3n2MfTPkmLVry/y14cjmwv0eYZNM4eZ3MRajQaS3Eg/VEArSEGk9KzRZkmWHog3x 1Yv0jojq+0++VKmSvH5XgakuziUsxgEQd1SHuYmrgaXxcL8wwufHHlCcTdHZ/QvrspwTjsvv neLld70AT1ksJWOVGmQsLyTqFuP1TM9KGYDYWoPSlID6ty6+YUr1EuQFpBkDbK/icDzFXfo2 TeWoSMihrIVy8kWy6G8+lOBiDWpznTUcjMICszsdjrNxmtEiESNPeRENXCzAS58Ebuk
- Ironport-hdrordr: A9a23:tZdbLqpaqphIasjB9ksx3REaV5uhL9V00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssSkb6Ku90KnpewK+yXcH2/hqAV7CZnivhILMFu1fBOTZslrd8kHFl9K1kJ 0QC5SWa+eARmSS7/yKhjVQeuxIqLbozEnrv5am854Hd3AJV0gU1XYcNu/tKDwSeOApP/oEPa vZwvACiyureHwRYMj+LGICRfL/q9rCk4+jSQIaBjY8gTP+wA+A2frfKVy1zx0eWzRAzfMJ6m 7eiTH04a2lrrWS1gLc7WnO9J5b8eGRhuerRfb8xfT9GA+cyzpAV74RG4FqewpF491H3Wxa3u UkZS1QffibpUmhO11d6iGdpjUImAxel0MKj2Xoy0cL6PaJOw4SGo5Pg5lUfQDe7FdltNZg0L hT12bcrJZPCwjc9R6NkOQgeisa43Zcm0BS5dI7njhaS88TebVRpYsQ8AdcF4oBBjvz7MQiHP N1BM/R6f5KeRfCBkqp91VH0ZipRDA+Dx2GSk8Ntoic1CVXhmlwyw8dyNYElnkN+ZohQ91P5v jCMK5viLZSJ/VmG55VFaMEW4+6G2bNSRXDPCabJknmDrgOPzbXp5v+8NwOlZOXkVwzvegPcb j6ISNlXDQJCjzT4OW1rex2ziw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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é <roger.pau@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
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
|