diff mbox series

[v4,1/6] x86/msi: remove some unused-but-set-variables

Message ID 20230828175858.30780-2-stewart.hildebrand@amd.com (mailing list archive)
State Superseded
Headers show
Series vPCI capabilities filtering | expand

Commit Message

Stewart Hildebrand Aug. 28, 2023, 5:56 p.m. UTC
These were left over after a previous pci_sbdf_t conversion.

Fixes: 0c38c61aad21 ("pci: switch pci_conf_write32 to use pci_sbdf_t")
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
---
v3->v4:
* new patch: this change was split from
  ("xen/pci: convert pci_find_*cap* to pci_sbdf_t")

Found by building with EXTRA_CFLAGS_XEN_CORE="-Wunused-but-set-variable"

arch/x86/msi.c: In function ‘msi_set_mask_bit’:
arch/x86/msi.c:322:19: warning: variable ‘func’ set but not used [-Wunused-but-set-variable]
  322 |     u8 bus, slot, func;
      |                   ^~~~
arch/x86/msi.c:322:13: warning: variable ‘slot’ set but not used [-Wunused-but-set-variable]
  322 |     u8 bus, slot, func;
      |             ^~~~
arch/x86/msi.c:322:8: warning: variable ‘bus’ set but not used [-Wunused-but-set-variable]
  322 |     u8 bus, slot, func;
      |        ^~~
arch/x86/msi.c:321:9: warning: variable ‘seg’ set but not used [-Wunused-but-set-variable]
  321 |     u16 seg, control;
      |         ^~~
---
 xen/arch/x86/msi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Jan Beulich Aug. 29, 2023, 6:58 a.m. UTC | #1
On 28.08.2023 19:56, Stewart Hildebrand wrote:
> These were left over after a previous pci_sbdf_t conversion.
> 
> Fixes: 0c38c61aad21 ("pci: switch pci_conf_write32 to use pci_sbdf_t")
> Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index d0bf63df1def..41b82f3e87cb 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -318,17 +318,12 @@  static bool msi_set_mask_bit(struct irq_desc *desc, bool host, bool guest)
 {
     struct msi_desc *entry = desc->msi_desc;
     struct pci_dev *pdev;
-    u16 seg, control;
-    u8 bus, slot, func;
+    uint16_t control;
     bool flag = host || guest, maskall;
 
     ASSERT(spin_is_locked(&desc->lock));
     BUG_ON(!entry || !entry->dev);
     pdev = entry->dev;
-    seg = pdev->seg;
-    bus = pdev->bus;
-    slot = PCI_SLOT(pdev->devfn);
-    func = PCI_FUNC(pdev->devfn);
     switch ( entry->msi_attrib.type )
     {
     case PCI_CAP_ID_MSI: