Skip to content

Commit e1a6333

Browse files
MakwanaVihasbjorn-helgaas
authored andcommitted
PCI: ibmphp: Remove commented-out functions
The functions get_max_adapter_speed() and get_bus_name() in ibmphp_core.c are commented-out and the fields .get_max_adapter_speed and .get_bus_name_status are removed from struct hotplug_slot_ops in pci_hotplug.h. Remove the commented-out functions. Link: https://lore.kernel.org/r/20211209213618.20522-1-makvihas@gmail.com Signed-off-by: Vihas Mak <makvihas@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 23584c1 commit e1a6333

2 files changed

Lines changed: 0 additions & 79 deletions

File tree

drivers/pci/hotplug/TODO

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ ibmphp:
3030
or ibmphp should store a pointer to its bus in struct slot. Probably the
3131
former.
3232

33-
* The functions get_max_adapter_speed() and get_bus_name() are commented out.
34-
Can they be deleted? There are also forward declarations at the top of
35-
ibmphp_core.c as well as pointers in ibmphp_hotplug_slot_ops, likewise
36-
commented out.
37-
3833
* ibmphp_init_devno() takes a struct slot **, it could instead take a
3934
struct slot *.
4035

drivers/pci/hotplug/ibmphp_core.c

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ static int irqs[16]; /* PIC mode IRQs we're using so far (in case MPS
5050

5151
static int init_flag;
5252

53-
/*
54-
static int get_max_adapter_speed_1 (struct hotplug_slot *, u8 *, u8);
55-
56-
static inline int get_max_adapter_speed (struct hotplug_slot *hs, u8 *value)
57-
{
58-
return get_max_adapter_speed_1 (hs, value, 1);
59-
}
60-
*/
6153
static inline int get_cur_bus_info(struct slot **sl)
6254
{
6355
int rc = 1;
@@ -401,69 +393,6 @@ static int get_max_bus_speed(struct slot *slot)
401393
return rc;
402394
}
403395

404-
/*
405-
static int get_max_adapter_speed_1(struct hotplug_slot *hotplug_slot, u8 *value, u8 flag)
406-
{
407-
int rc = -ENODEV;
408-
struct slot *pslot;
409-
struct slot myslot;
410-
411-
debug("get_max_adapter_speed_1 - Entry hotplug_slot[%lx] pvalue[%lx]\n",
412-
(ulong)hotplug_slot, (ulong) value);
413-
414-
if (flag)
415-
ibmphp_lock_operations();
416-
417-
if (hotplug_slot && value) {
418-
pslot = hotplug_slot->private;
419-
if (pslot) {
420-
memcpy(&myslot, pslot, sizeof(struct slot));
421-
rc = ibmphp_hpc_readslot(pslot, READ_SLOTSTATUS,
422-
&(myslot.status));
423-
424-
if (!(SLOT_LATCH (myslot.status)) &&
425-
(SLOT_PRESENT (myslot.status))) {
426-
rc = ibmphp_hpc_readslot(pslot,
427-
READ_EXTSLOTSTATUS,
428-
&(myslot.ext_status));
429-
if (!rc)
430-
*value = SLOT_SPEED(myslot.ext_status);
431-
} else
432-
*value = MAX_ADAPTER_NONE;
433-
}
434-
}
435-
436-
if (flag)
437-
ibmphp_unlock_operations();
438-
439-
debug("get_max_adapter_speed_1 - Exit rc[%d] value[%x]\n", rc, *value);
440-
return rc;
441-
}
442-
443-
static int get_bus_name(struct hotplug_slot *hotplug_slot, char *value)
444-
{
445-
int rc = -ENODEV;
446-
struct slot *pslot = NULL;
447-
448-
debug("get_bus_name - Entry hotplug_slot[%lx]\n", (ulong)hotplug_slot);
449-
450-
ibmphp_lock_operations();
451-
452-
if (hotplug_slot) {
453-
pslot = hotplug_slot->private;
454-
if (pslot) {
455-
rc = 0;
456-
snprintf(value, 100, "Bus %x", pslot->bus);
457-
}
458-
} else
459-
rc = -ENODEV;
460-
461-
ibmphp_unlock_operations();
462-
debug("get_bus_name - Exit rc[%d] value[%x]\n", rc, *value);
463-
return rc;
464-
}
465-
*/
466-
467396
/****************************************************************************
468397
* This routine will initialize the ops data structure used in the validate
469398
* function. It will also power off empty slots that are powered on since BIOS
@@ -1231,9 +1160,6 @@ const struct hotplug_slot_ops ibmphp_hotplug_slot_ops = {
12311160
.get_attention_status = get_attention_status,
12321161
.get_latch_status = get_latch_status,
12331162
.get_adapter_status = get_adapter_present,
1234-
/* .get_max_adapter_speed = get_max_adapter_speed,
1235-
.get_bus_name_status = get_bus_name,
1236-
*/
12371163
};
12381164

12391165
static void ibmphp_unload(void)

0 commit comments

Comments
 (0)