[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-4.17 4/6] vpci: introduce a local vpci_bar variable to modify_decoding()
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Thu, 20 Oct 2022 11:46:47 +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=tcNqGycumZluqS1dv81OQzz4p9zUec8vGdrHjobcML0=; b=fu0+v4n25iLXRhQYOYLizZ2ZIk7x9zCHtXyYR4Bpd34cu7hiTncXYtBpt/BVwBe/5lAEUVdJz16TC8ltP8u2xalc6romO8LZewN3A6LpTwG4F6Xp6jTcvUWX56grkaob+oG06t+cls68bq01z3F7z5W+0Jrx94K87rX9hmLAI+XgcDU1AoRGCXtDSF6H/dvTfFVrGHxXXUE5pm8thZPi+2SveavIB+kCRxuIpZoMMqjFZDik6YZ+D7c5O+fQFOadSWBipZiWIuwA2i8vmEdSN/Bmg2ec2Urhpv9JI8KncxmPdE/DHByIA0TWQ0ersD0jNHGsR8hOCcXnfbfcGCMNXA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RGCC6ZWd2XotCbco2NAAFVjsEK6yOR8geiHqFqm9PLLj9dQ/qH2dBrGgNejOPStM55yUx0p08A2Zx35zK2LKJ17MzxIWdLrqnaSD+3pWbNIvoR6hF+M8zzgFTydVtoznltdvvLJ/f+WkPgSPeBMLKcjn75a3GdTBRnG1vpXTcamjSrodJOKstoWlBI2oXTZ7dfUu23OIOytPOer9TYzl+WtlLLkoy/S8JqwM5lBDoEE+8XleMky7pwi8WkkUgpXr1+0r79McbtgGoXoDzf2ZlyGBPg5buPmaWvp4imG9x11PqWXaO9t58w+7bJzZc/dn6WPPq6kh5IHGs4E7lOcAwQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Delivery-date: Thu, 20 Oct 2022 09:47:34 +0000
- Ironport-data: A9a23:EQJS/K4b1k08hWOIvF9hhgxRtELGchMFZxGqfqrLsTDasY5as4F+v modWj+CMvaKYmH2f99+ad+//EsHu8PdytNgTwZtqHsyHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvymTras1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31GWNglaYCUpJrfPewP9TlK6q4mlB5gZmPakjUGL2zBH5MrpOfcldEFOgKmVkNrbSb /rOyri/4lTY838FYj9yuu+mGqGiaue60Tmm0hK6aYD76vRxjnVaPpIAHOgdcS9qZwChxLid/ jnvWauYEm/FNoWU8AgUvoIx/ytWZcWq85efSZSzXFD6I+QrvBIAzt03ZHzaM7H09c5oKztAq 8ZfEAk1ZzW7ls7twpmCc9hF05FLwMnDZOvzu1lG5BSAVLMNZsmGRK/Ho9hFwD03m8ZCW+7EY NYUYiZuaxKGZABTPlAQC9Q1m+LAanvXKmUE7g7K4/dppTGNnGSd05C0WDbRUsaNSshP2F6Ru 0rN/njjAwFcP9uaodaA2iL327GSzXyiMG4UPKL/3MRXg2fN/Vc4Cjw/V1mcruKkpGfrDrqzL GRRoELCt5Ma5EGtC9XwQRC8iHqFpQIHHcpdFfUg7wOAwbaS5ByWblXoVRZEYd0i8cQxHDoj0 wbQm8uzXGI/9rqIVXia67GY6yuoPjQYJnMDYilCShYZ597ko8c4iRenostfLZNZR+bdQVnYq w1mZgBn71nPpabnD5mGwG0=
- Ironport-hdrordr: A9a23:uud85ap6qzRjBQVQjMXfHrQaV5uwL9V00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssREb9uxo9pPwI080kqQFm7X5XI3SJzUO3VHFEGgM1/qH/9SNIU3DH6tmpN 5dmstFeaLN5CZB/KHHCWCDer5PoeVvsprY/ds2p00dMT2CAJsQijuRZDzrcXGfE2J9dOcE/d enl7x6jgvlXU5SQtWwB3EDUeSGj9rXlKj+aRpDIxI88gGBgR6h9ba/SnGjr18jegIK5Y1n3X nOkgT/6Knmm/anyiXE32uWy5hNgtPuxvZKGcTJoMkILTfHjBquee1aKvS/lQFwhNvqxEchkd HKrRtlF8Nv60nJdmXwmhfp0xmI6kda11bSjXujxVfzq83wQzw3T+Bbg5hCTxff4008+Plhza NixQuixtZqJCKFuB64y8nDVhlsmEbxi2Eli/Qvg3tWVpZbQKNNrLYY4FheHP47bW/HAbgcYa dT5fznlbdrmQvwVQGYgoAv+q3nYp0LJGbIfqBY0fblkAS/nxhCvjklLYIk7zU9HakGOul5Dt T/Q9pVfY51P74rhNpGdYE8qOuMexjwqEH3QRWvCGWiMp07EFTwjLOyyIkJxYiRCe81Jd0J6d /8bG8=
- 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>
---
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
|