Skip to content

Commit ab9c6c8

Browse files
kkaneshigejbarnes993
authored andcommitted
PCI: pciehp: remove bus field
The bus field in struct slot is not necessary. Acked-by: Alex Chiang <achiang@hp.com> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent 6a11c13 commit ab9c6c8

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎drivers/pci/hotplug/pciehp.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ do { \
7272

7373
#define SLOT_NAME_SIZE 10
7474
struct slot {
75-
u8 bus;
7675
u8 device;
7776
u8 state;
7877
u8 hp_slot;

‎drivers/pci/hotplug/pciehp_core.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ static int init_slot(struct controller *ctrl)
126126
ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x "
127127
"hp_slot=%x sun=%x slot_device_offset=%x\n",
128128
pci_domain_nr(ctrl->pci_dev->subordinate),
129-
slot->bus, slot->device, slot->hp_slot, slot->number,
129+
ctrl->pci_dev->subordinate->number,
130+
slot->device, slot->hp_slot, slot->number,
130131
ctrl->slot_device_offset);
131132
retval = pci_hp_register(hotplug,
132133
ctrl->pci_dev->subordinate,

‎drivers/pci/hotplug/pciehp_ctrl.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ static int board_added(struct slot *p_slot)
242242
retval = pciehp_configure_device(p_slot);
243243
if (retval) {
244244
ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n",
245-
pci_domain_nr(parent), p_slot->bus, p_slot->device);
245+
pci_domain_nr(parent), parent->number,
246+
p_slot->device);
246247
goto err_exit;
247248
}
248249

@@ -319,7 +320,8 @@ static void pciehp_power_thread(struct work_struct *work)
319320
ctrl_dbg(p_slot->ctrl,
320321
"Disabling domain:bus:device=%04x:%02x:%02x\n",
321322
pci_domain_nr(p_slot->ctrl->pci_dev->subordinate),
322-
p_slot->bus, p_slot->device);
323+
p_slot->ctrl->pci_dev->subordinate->number,
324+
p_slot->device);
323325
pciehp_disable_slot(p_slot);
324326
mutex_lock(&p_slot->lock);
325327
p_slot->state = STATIC_STATE;

‎drivers/pci/hotplug/pciehp_hpc.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,6 @@ static int pcie_init_slot(struct controller *ctrl)
930930

931931
slot->hp_slot = 0;
932932
slot->ctrl = ctrl;
933-
slot->bus = ctrl->pci_dev->subordinate->number;
934933
slot->device = ctrl->slot_device_offset + slot->hp_slot;
935934
slot->hpc_ops = ctrl->hpc_ops;
936935
slot->number = ctrl->first_slot;

‎drivers/pci/hotplug/pciehp_pci.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ int pciehp_configure_device(struct slot *p_slot)
7171
if (dev) {
7272
ctrl_err(ctrl, "Device %s already exists "
7373
"at %04x:%02x:%02x, cannot hot-add\n", pci_name(dev),
74-
pci_domain_nr(parent), p_slot->bus, p_slot->device);
74+
pci_domain_nr(parent), parent->number,
75+
p_slot->device);
7576
pci_dev_put(dev);
7677
return -EINVAL;
7778
}
@@ -116,7 +117,8 @@ int pciehp_unconfigure_device(struct slot *p_slot)
116117
struct controller *ctrl = p_slot->ctrl;
117118

118119
ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n",
119-
__func__, pci_domain_nr(parent), p_slot->bus, p_slot->device);
120+
__func__, pci_domain_nr(parent), parent->number,
121+
p_slot->device);
120122
ret = p_slot->hpc_ops->get_adapter_status(p_slot, &presence);
121123
if (ret)
122124
presence = 0;

0 commit comments

Comments
 (0)