Skip to contentSkip to conversation

hw/pci: Remove unused pcie_chassis_find_slot

PATCH In review [email protected] 3 participants 3 messages Sep 18, 2024 – Oct 3, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/pci: Remove unused pcie_chassis_find_slot

From: "Dr. David Alan Gilbert" <[email protected]>

pcie_chassis_find_slot has been unused since it was added.

Remove it.

---
 hw/pci/pcie_port.c         | 10 ----------
 include/hw/pci/pcie_port.h |  1 -
 2 files changed, 11 deletions(-)
hw/pci/pcie_port.c +0 -10
index 20ff2b39e8..9f978ba164 100644
@@ -92,16 +92,6 @@ static PCIESlot *pcie_chassis_find_slot_with_chassis(struct PCIEChassis *c,
     return s;
 }
 
-PCIESlot *pcie_chassis_find_slot(uint8_t chassis_number, uint16_t slot)
-{
-    struct PCIEChassis *c;
-    c = pcie_chassis_find(chassis_number);
-    if (!c) {
-        return NULL;
-    }
-    return pcie_chassis_find_slot_with_chassis(c, slot);
-}
-
 int pcie_chassis_add_slot(struct PCIESlot *slot)
 {
     struct PCIEChassis *c;
include/hw/pci/pcie_port.h +0 -1
index 90e6cf45b8..7cd7af8cfa 100644
@@ -72,7 +72,6 @@ struct PCIESlot {
 };
 
 void pcie_chassis_create(uint8_t chassis_number);
-PCIESlot *pcie_chassis_find_slot(uint8_t chassis, uint16_t slot);
 int pcie_chassis_add_slot(struct PCIESlot *slot);
 void pcie_chassis_del_slot(PCIESlot *s);
 
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 38 lines · On 19/09/2024 01.47, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

pcie_chassis_find_slot has been unused since it was added.

Remove it.

---
  hw/pci/pcie_port.c         | 10 ----------
  include/hw/pci/pcie_port.h |  1 -
  2 files changed, 11 deletions(-)
hw/pci/pcie_port.c +0 -10
index 20ff2b39e8..9f978ba164 100644
@@ -92,16 +92,6 @@ static PCIESlot *pcie_chassis_find_slot_with_chassis(struct PCIEChassis *c,
      return s;
  }
 
-PCIESlot *pcie_chassis_find_slot(uint8_t chassis_number, uint16_t slot)
-{
-    struct PCIEChassis *c;
-    c = pcie_chassis_find(chassis_number);
-    if (!c) {
-        return NULL;
-    }
-    return pcie_chassis_find_slot_with_chassis(c, slot);
-}
-
  int pcie_chassis_add_slot(struct PCIESlot *slot)
  {
      struct PCIEChassis *c;
include/hw/pci/pcie_port.h +0 -0
index 90e6cf45b8..7cd7af8cfa 100644

include/hw/pci/pcie_port.h struct PCIESlot { · line 77

Quoted 7 lines
include/hw/pci/pcie_port.h +0 -1
@@ -72,7 +72,6 @@ struct PCIESlot {
  };
 
  void pcie_chassis_create(uint8_t chassis_number);
-PCIESlot *pcie_chassis_find_slot(uint8_t chassis, uint16_t slot);
  int pcie_chassis_add_slot(struct PCIESlot *slot);
  void pcie_chassis_del_slot(PCIESlot *s);
 
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 11 lines · On 19/9/24 01:47, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

pcie_chassis_find_slot has been unused since it was added.

Remove it.

---
  hw/pci/pcie_port.c         | 10 ----------
  include/hw/pci/pcie_port.h |  1 -
  2 files changed, 11 deletions(-)