PCI: shpchp: Remove unused get_mode1_ECC_cap callback
The ->get_mode1_ECC_cap callback in the shpchp_hpc_ops struct is never called, so remove it. [bhelgaas: squash] Link: https://lore.kernel.org/r/20221112142859.319733-2-ian@linux.cowan.aero Link: https://lore.kernel.org/r/20221112142859.319733-3-ian@linux.cowan.aero Link: https://lore.kernel.org/r/20221112142859.319733-4-ian@linux.cowan.aero Signed-off-by: Ian Cowan <ian@linux.cowan.aero> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
Родитель
c63a3be76d
Коммит
9676f40618
|
@ -58,9 +58,6 @@ shpchp:
|
||||||
pciehp with commit 82a9e79ef132 ("PCI: pciehp: remove hpc_ops"). Clarify
|
pciehp with commit 82a9e79ef132 ("PCI: pciehp: remove hpc_ops"). Clarify
|
||||||
if there was a specific reason not to apply the same change to shpchp.
|
if there was a specific reason not to apply the same change to shpchp.
|
||||||
|
|
||||||
* The ->get_mode1_ECC_cap callback in shpchp_hpc_ops is never invoked.
|
|
||||||
Why was it introduced? Can it be removed?
|
|
||||||
|
|
||||||
* The hardirq handler shpc_isr() queues events on a workqueue. It can be
|
* The hardirq handler shpc_isr() queues events on a workqueue. It can be
|
||||||
simplified by converting it to threaded IRQ handling. Use pciehp as a
|
simplified by converting it to threaded IRQ handling. Use pciehp as a
|
||||||
template.
|
template.
|
||||||
|
|
|
@ -311,7 +311,6 @@ struct hpc_ops {
|
||||||
int (*get_latch_status)(struct slot *slot, u8 *status);
|
int (*get_latch_status)(struct slot *slot, u8 *status);
|
||||||
int (*get_adapter_status)(struct slot *slot, u8 *status);
|
int (*get_adapter_status)(struct slot *slot, u8 *status);
|
||||||
int (*get_adapter_speed)(struct slot *slot, enum pci_bus_speed *speed);
|
int (*get_adapter_speed)(struct slot *slot, enum pci_bus_speed *speed);
|
||||||
int (*get_mode1_ECC_cap)(struct slot *slot, u8 *mode);
|
|
||||||
int (*get_prog_int)(struct slot *slot, u8 *prog_int);
|
int (*get_prog_int)(struct slot *slot, u8 *prog_int);
|
||||||
int (*query_power_fault)(struct slot *slot);
|
int (*query_power_fault)(struct slot *slot);
|
||||||
void (*green_led_on)(struct slot *slot);
|
void (*green_led_on)(struct slot *slot);
|
||||||
|
|
|
@ -489,23 +489,6 @@ static int hpc_get_adapter_speed(struct slot *slot, enum pci_bus_speed *value)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int hpc_get_mode1_ECC_cap(struct slot *slot, u8 *mode)
|
|
||||||
{
|
|
||||||
int retval = 0;
|
|
||||||
struct controller *ctrl = slot->ctrl;
|
|
||||||
u16 sec_bus_status = shpc_readw(ctrl, SEC_BUS_CONFIG);
|
|
||||||
u8 pi = shpc_readb(ctrl, PROG_INTERFACE);
|
|
||||||
|
|
||||||
if (pi == 2) {
|
|
||||||
*mode = (sec_bus_status & 0x0100) >> 8;
|
|
||||||
} else {
|
|
||||||
retval = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ctrl_dbg(ctrl, "Mode 1 ECC cap = %d\n", *mode);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int hpc_query_power_fault(struct slot *slot)
|
static int hpc_query_power_fault(struct slot *slot)
|
||||||
{
|
{
|
||||||
struct controller *ctrl = slot->ctrl;
|
struct controller *ctrl = slot->ctrl;
|
||||||
|
@ -900,7 +883,6 @@ static const struct hpc_ops shpchp_hpc_ops = {
|
||||||
.get_adapter_status = hpc_get_adapter_status,
|
.get_adapter_status = hpc_get_adapter_status,
|
||||||
|
|
||||||
.get_adapter_speed = hpc_get_adapter_speed,
|
.get_adapter_speed = hpc_get_adapter_speed,
|
||||||
.get_mode1_ECC_cap = hpc_get_mode1_ECC_cap,
|
|
||||||
.get_prog_int = hpc_get_prog_int,
|
.get_prog_int = hpc_get_prog_int,
|
||||||
|
|
||||||
.query_power_fault = hpc_query_power_fault,
|
.query_power_fault = hpc_query_power_fault,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче