linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: pciehp: Cleanup unused HP_SUPR_RM macro
@ 2020-04-19 13:36 Ani Sinha
  2020-04-20  9:09 ` Mika Westerberg
  0 siblings, 1 reply; 3+ messages in thread
From: Ani Sinha @ 2020-04-19 13:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: ani, Ani Sinha, Bjorn Helgaas, Andy Shevchenko, Keith Busch,
	Frederick Lawler, Denis Efremov, Mika Westerberg, Lukas Wunner,
	linux-pci

We do not use PCIE hotplug surprise (PCI_EXP_SLTCAP_HPS) bit anymore.
Consequently HP_SUPR_RM() macro is not used in the kernel source anymore.
Let's clean it up.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
---
 drivers/pci/hotplug/pciehp.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index ae44f46..5747967 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -148,7 +148,6 @@ struct controller {
 #define MRL_SENS(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_MRLSP)
 #define ATTN_LED(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_AIP)
 #define PWR_LED(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_PIP)
-#define HP_SUPR_RM(ctrl)	((ctrl)->slot_cap & PCI_EXP_SLTCAP_HPS)
 #define EMI(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_EIP)
 #define NO_CMD_CMPL(ctrl)	((ctrl)->slot_cap & PCI_EXP_SLTCAP_NCCS)
 #define PSN(ctrl)		(((ctrl)->slot_cap & PCI_EXP_SLTCAP_PSN) >> 19)
-- 
2.7.4


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

* Re: [PATCH] PCI: pciehp: Cleanup unused HP_SUPR_RM macro
  2020-04-19 13:36 [PATCH] PCI: pciehp: Cleanup unused HP_SUPR_RM macro Ani Sinha
@ 2020-04-20  9:09 ` Mika Westerberg
  2020-04-20 12:52   ` Ani Sinha
  0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2020-04-20  9:09 UTC (permalink / raw)
  To: Ani Sinha
  Cc: linux-kernel, ani, Bjorn Helgaas, Andy Shevchenko, Keith Busch,
	Frederick Lawler, Denis Efremov, Lukas Wunner, linux-pci

On Sun, Apr 19, 2020 at 07:06:20PM +0530, Ani Sinha wrote:
> We do not use PCIE hotplug surprise (PCI_EXP_SLTCAP_HPS) bit anymore.
> Consequently HP_SUPR_RM() macro is not used in the kernel source anymore.
> Let's clean it up.
> 
> Signed-off-by: Ani Sinha <ani@anisinha.ca>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

BTW, there seem to be other macros like EMI() that is not used anymore
so maybe worth removing them as well.

> ---
>  drivers/pci/hotplug/pciehp.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
> index ae44f46..5747967 100644
> --- a/drivers/pci/hotplug/pciehp.h
> +++ b/drivers/pci/hotplug/pciehp.h
> @@ -148,7 +148,6 @@ struct controller {
>  #define MRL_SENS(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_MRLSP)
>  #define ATTN_LED(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_AIP)
>  #define PWR_LED(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_PIP)
> -#define HP_SUPR_RM(ctrl)	((ctrl)->slot_cap & PCI_EXP_SLTCAP_HPS)
>  #define EMI(ctrl)		((ctrl)->slot_cap & PCI_EXP_SLTCAP_EIP)
>  #define NO_CMD_CMPL(ctrl)	((ctrl)->slot_cap & PCI_EXP_SLTCAP_NCCS)
>  #define PSN(ctrl)		(((ctrl)->slot_cap & PCI_EXP_SLTCAP_PSN) >> 19)
> -- 
> 2.7.4

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

* Re: [PATCH] PCI: pciehp: Cleanup unused HP_SUPR_RM macro
  2020-04-20  9:09 ` Mika Westerberg
@ 2020-04-20 12:52   ` Ani Sinha
  0 siblings, 0 replies; 3+ messages in thread
From: Ani Sinha @ 2020-04-20 12:52 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: linux-kernel, Ani Sinha, Bjorn Helgaas, Andy Shevchenko,
	Keith Busch, Frederick Lawler, Denis Efremov, Lukas Wunner,
	linux-pci

On Mon, Apr 20, 2020 at 2:39 PM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
>
> On Sun, Apr 19, 2020 at 07:06:20PM +0530, Ani Sinha wrote:
> > We do not use PCIE hotplug surprise (PCI_EXP_SLTCAP_HPS) bit anymore.
> > Consequently HP_SUPR_RM() macro is not used in the kernel source anymore.
> > Let's clean it up.
> >
> > Signed-off-by: Ani Sinha <ani@anisinha.ca>
>
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> BTW, there seem to be other macros like EMI() that is not used anymore
> so maybe worth removing them as well.

Sent a patch.

>
>
> > ---
> >  drivers/pci/hotplug/pciehp.h | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
> > index ae44f46..5747967 100644
> > --- a/drivers/pci/hotplug/pciehp.h
> > +++ b/drivers/pci/hotplug/pciehp.h
> > @@ -148,7 +148,6 @@ struct controller {
> >  #define MRL_SENS(ctrl)               ((ctrl)->slot_cap & PCI_EXP_SLTCAP_MRLSP)
> >  #define ATTN_LED(ctrl)               ((ctrl)->slot_cap & PCI_EXP_SLTCAP_AIP)
> >  #define PWR_LED(ctrl)                ((ctrl)->slot_cap & PCI_EXP_SLTCAP_PIP)
> > -#define HP_SUPR_RM(ctrl)     ((ctrl)->slot_cap & PCI_EXP_SLTCAP_HPS)
> >  #define EMI(ctrl)            ((ctrl)->slot_cap & PCI_EXP_SLTCAP_EIP)
> >  #define NO_CMD_CMPL(ctrl)    ((ctrl)->slot_cap & PCI_EXP_SLTCAP_NCCS)
> >  #define PSN(ctrl)            (((ctrl)->slot_cap & PCI_EXP_SLTCAP_PSN) >> 19)
> > --
> > 2.7.4

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

end of thread, other threads:[~2020-04-20 12:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-19 13:36 [PATCH] PCI: pciehp: Cleanup unused HP_SUPR_RM macro Ani Sinha
2020-04-20  9:09 ` Mika Westerberg
2020-04-20 12:52   ` Ani Sinha

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).