Skip to contentSkip to conversation

xio3130_downstream: typo fix

PATCH In review Michael S. Tsirkin 3 participants 3 messages Jul 11, 2019 – Jul 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xio3130_downstream: typo fix

slt ctl/status are passed in incorrect order.
Fix this up.

---
 hw/pci-bridge/xio3130_downstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-bridge/xio3130_downstream.c +1 -1
index 899b0fd6c9..182e164f74 100644
@@ -43,7 +43,7 @@ static void xio3130_downstream_write_config(PCIDevice *d, uint32_t address,
 {
     uint16_t slt_ctl, slt_sta;
 
-    pcie_cap_slot_get(d, &slt_sta, &slt_ctl);
+    pcie_cap_slot_get(d, &slt_ctl, &slt_sta);
     pci_bridge_write_config(d, address, val, len);
     pcie_cap_flr_write_config(d, address, val, len);
     pcie_cap_slot_write_config(d, slt_ctl, slt_sta, address, val, len);
Signature · 1 line
MST
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Michael S. Tsirkin

slt ctl/status are passed in incorrect order.
Fix this up.

---
  hw/pci-bridge/xio3130_downstream.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-bridge/xio3130_downstream.c +0 -0
index 899b0fd6c9..182e164f74 100644

hw/pci-bridge/xio3130_downstream.c static void xio3130_downstream_write_config(PCIDevice *d, uint32_t address, · line 49

Quoted 8 lines
hw/pci-bridge/xio3130_downstream.c +1 -1
@@ -43,7 +43,7 @@ static void xio3130_downstream_write_config(PCIDevice *d, uint32_t address,
  {
      uint16_t slt_ctl, slt_sta;
 
-    pcie_cap_slot_get(d, &slt_sta, &slt_ctl);
+    pcie_cap_slot_get(d, &slt_ctl, &slt_sta);
      pci_bridge_write_config(d, address, val, len);
      pcie_cap_flr_write_config(d, address, val, len);
      pcie_cap_slot_write_config(d, slt_ctl, slt_sta, address, val, len);

Thanks,
Marcel

#2 lore raw
In reply to Michael S. Tsirkin
Quoted 3 lines · Michael S. Tsirkin

slt ctl/status are passed in incorrect order.
Fix this up.

Fixes Coverity (CID 1403007)
Quoted 20 lines
---
 hw/pci-bridge/xio3130_downstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci-bridge/xio3130_downstream.c +1 -1
index 899b0fd6c9..182e164f74 100644
@@ -43,7 +43,7 @@ static void xio3130_downstream_write_config(PCIDevice *d, uint32_t address,
 {
     uint16_t slt_ctl, slt_sta;
 
-    pcie_cap_slot_get(d, &slt_sta, &slt_ctl);
+    pcie_cap_slot_get(d, &slt_ctl, &slt_sta);
     pci_bridge_write_config(d, address, val, len);
     pcie_cap_flr_write_config(d, address, val, len);
     pcie_cap_slot_write_config(d, slt_ctl, slt_sta, address, val, len);