linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback
@ 2022-11-12 14:28 Ian Cowan
  2022-11-12 14:28 ` [PATCH 1/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback declaration Ian Cowan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Cowan @ 2022-11-12 14:28 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Ian Cowan

In the SHPC module, the get_mode1_ECC_cap callback is never used from
the hpc_ops struct, so this patch series removes that callback from both the
definition of the struct and the definition of the shpchp_hps_ops
struct. Additionally, this removes the reference in the TODO of the SHPC
module.

Ian Cowan (3):
  PCI: SHPC: remove unused get_mode1_ECC_cap callback declaration
  PCI: SHPC: remove unused get_mode1_ECC_cap callback from definition
  PCI: SHPC: update todo

 drivers/pci/hotplug/TODO         |  3 ---
 drivers/pci/hotplug/shpchp.h     |  1 -
 drivers/pci/hotplug/shpchp_hpc.c | 18 ------------------
 3 files changed, 22 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback declaration
  2022-11-12 14:28 [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Ian Cowan
@ 2022-11-12 14:28 ` Ian Cowan
  2022-11-12 14:28 ` [PATCH 2/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback from definition Ian Cowan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Cowan @ 2022-11-12 14:28 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Ian Cowan

The ->get_mode1_ECC_cap callback in the shpchp_hpc_ops struct is never
called so we'll remove it. This removes that callback from the
declaration of the struct in the shpc module.

Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
 drivers/pci/hotplug/shpchp_hpc.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index bd7557ca4910..48e4daefc44a 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -489,23 +489,6 @@ static int hpc_get_adapter_speed(struct slot *slot, enum pci_bus_speed *value)
 	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)
 {
 	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_speed		= hpc_get_adapter_speed,
-	.get_mode1_ECC_cap		= hpc_get_mode1_ECC_cap,
 	.get_prog_int			= hpc_get_prog_int,
 
 	.query_power_fault		= hpc_query_power_fault,
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback from definition
  2022-11-12 14:28 [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Ian Cowan
  2022-11-12 14:28 ` [PATCH 1/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback declaration Ian Cowan
@ 2022-11-12 14:28 ` Ian Cowan
  2022-11-12 14:28 ` [PATCH 3/3] PCI: SHPC: update todo Ian Cowan
  2022-12-07 14:37 ` [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Bjorn Helgaas
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Cowan @ 2022-11-12 14:28 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Ian Cowan

The ->get_mode1_ECC_cap callback is never used in the shpchp_hpc_ops
struct, so we can remove that. This removes that from the hpc_ops struct
definition in the shpc module.

Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
 drivers/pci/hotplug/shpchp.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
index 6e85885b554c..3a97f455336e 100644
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -311,7 +311,6 @@ struct hpc_ops {
 	int (*get_latch_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_mode1_ECC_cap)(struct slot *slot, u8 *mode);
 	int (*get_prog_int)(struct slot *slot, u8 *prog_int);
 	int (*query_power_fault)(struct slot *slot);
 	void (*green_led_on)(struct slot *slot);
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] PCI: SHPC: update todo
  2022-11-12 14:28 [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Ian Cowan
  2022-11-12 14:28 ` [PATCH 1/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback declaration Ian Cowan
  2022-11-12 14:28 ` [PATCH 2/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback from definition Ian Cowan
@ 2022-11-12 14:28 ` Ian Cowan
  2022-12-07 14:37 ` [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Bjorn Helgaas
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Cowan @ 2022-11-12 14:28 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel, Ian Cowan

This removes the note in the todo regarding the removal of the
->get_mode1_ECC_cap callback.

Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
 drivers/pci/hotplug/TODO | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/pci/hotplug/TODO b/drivers/pci/hotplug/TODO
index 88f217c82b4f..fdb8dd6ea24d 100644
--- a/drivers/pci/hotplug/TODO
+++ b/drivers/pci/hotplug/TODO
@@ -58,9 +58,6 @@ shpchp:
   pciehp with commit 82a9e79ef132 ("PCI: pciehp: remove hpc_ops").  Clarify
   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
   simplified by converting it to threaded IRQ handling.  Use pciehp as a
   template.
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback
  2022-11-12 14:28 [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Ian Cowan
                   ` (2 preceding siblings ...)
  2022-11-12 14:28 ` [PATCH 3/3] PCI: SHPC: update todo Ian Cowan
@ 2022-12-07 14:37 ` Bjorn Helgaas
  3 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2022-12-07 14:37 UTC (permalink / raw)
  To: Ian Cowan; +Cc: Bjorn Helgaas, linux-pci, linux-kernel

On Sat, Nov 12, 2022 at 09:28:56AM -0500, Ian Cowan wrote:
> In the SHPC module, the get_mode1_ECC_cap callback is never used from
> the hpc_ops struct, so this patch series removes that callback from both the
> definition of the struct and the definition of the shpchp_hps_ops
> struct. Additionally, this removes the reference in the TODO of the SHPC
> module.
> 
> Ian Cowan (3):
>   PCI: SHPC: remove unused get_mode1_ECC_cap callback declaration
>   PCI: SHPC: remove unused get_mode1_ECC_cap callback from definition
>   PCI: SHPC: update todo
> 
>  drivers/pci/hotplug/TODO         |  3 ---
>  drivers/pci/hotplug/shpchp.h     |  1 -
>  drivers/pci/hotplug/shpchp_hpc.c | 18 ------------------
>  3 files changed, 22 deletions(-)

Applied to pci/hotplug for v6.2, thanks, Ian!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-07 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-12 14:28 [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Ian Cowan
2022-11-12 14:28 ` [PATCH 1/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback declaration Ian Cowan
2022-11-12 14:28 ` [PATCH 2/3] PCI: SHPC: remove unused get_mode1_ECC_cap callback from definition Ian Cowan
2022-11-12 14:28 ` [PATCH 3/3] PCI: SHPC: update todo Ian Cowan
2022-12-07 14:37 ` [PATCH 0/3] PCI: SHPC: removed unused get_mode1_ECC_cap callback Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).