On Tue, Jul 23, 2024 at 02:43:25PM +0300, ngn wrote: > Remove the hpc_ops struct from shpchp. This struct is unnecessary as > no other hotplug controller implements it. A similar thing has already > been done in pciehp with commit 82a9e79ef132 ("PCI: pciehp: remove hpc_ops") > +++ b/drivers/pci/hotplug/shpchp_hpc.c > @@ -167,7 +167,6 @@ > > static irqreturn_t shpc_isr(int irq, void *dev_id); > static void start_int_poll_timer(struct controller *ctrl, int sec); > -static int hpc_check_cmd_status(struct controller *ctrl); > > static inline u8 shpc_readb(struct controller *ctrl, int reg) > { > @@ -317,7 +316,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) > if (retval) > goto out; > > - cmd_status = hpc_check_cmd_status(slot->ctrl); > + cmd_status = shpchp_check_cmd_status(slot->ctrl); This rename looks like it should be a separate patch because it's not part of removing hpc_ops. > if (cmd_status) { > ctrl_err(ctrl, "Failed to issued command 0x%x (error code = %d)\n", > cmd, cmd_status); > @@ -328,7 +327,7 @@ static int shpc_write_cmd(struct slot *slot, u8 t_slot, u8 cmd) > return retval; > } > > -static int hpc_check_cmd_status(struct controller *ctrl) > +int shpchp_check_cmd_status(struct controller *ctrl) > { > int retval = 0; > u16 cmd_status = shpc_readw(ctrl, CMD_STATUS) & 0x000F;