linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: dwc: Make dw_pcie_ptm_ops static
@ 2025-07-01 12:08 Manivannan Sadhasivam
  2025-07-01 16:39 ` Bjorn Helgaas
  2025-07-07  7:55 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2025-07-01 12:08 UTC (permalink / raw)
  To: lpieralisi, jingoohan1, kwilczynski, bhelgaas
  Cc: robh, linux-pci, linux-kernel, Manivannan Sadhasivam,
	Bjorn Helgaas

dw_pcie_ptm_ops is not used outside of this file, so make it static. This
also fixes the sparse warning:

  drivers/pci/controller/dwc/pcie-designware-debugfs.c:868:27: warning: symbol 'dw_pcie_ptm_ops' was not declared. Should it be static?

Fixes: 852a1fdd34a8 ("PCI: dwc: Add debugfs support for PTM context")
Reported-by: Bjorn Helgaas <helgaas@kernel.org>
Closes: https://lore.kernel.org/linux-pci/20250617231210.GA1172093@bhelgaas
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
---
 drivers/pci/controller/dwc/pcie-designware-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pcie-designware-debugfs.c b/drivers/pci/controller/dwc/pcie-designware-debugfs.c
index c67601096c48..7356b0f6a2ad 100644
--- a/drivers/pci/controller/dwc/pcie-designware-debugfs.c
+++ b/drivers/pci/controller/dwc/pcie-designware-debugfs.c
@@ -865,7 +865,7 @@ static bool dw_pcie_ptm_t4_visible(void *drvdata)
 	return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
 }
 
-const struct pcie_ptm_ops dw_pcie_ptm_ops = {
+static const struct pcie_ptm_ops dw_pcie_ptm_ops = {
 	.check_capability = dw_pcie_ptm_check_capability,
 	.context_update_write = dw_pcie_ptm_context_update_write,
 	.context_update_read = dw_pcie_ptm_context_update_read,
-- 
2.45.2


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

* Re: [PATCH] PCI: dwc: Make dw_pcie_ptm_ops static
  2025-07-01 12:08 [PATCH] PCI: dwc: Make dw_pcie_ptm_ops static Manivannan Sadhasivam
@ 2025-07-01 16:39 ` Bjorn Helgaas
  2025-07-07  7:55 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2025-07-01 16:39 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: lpieralisi, jingoohan1, kwilczynski, bhelgaas, robh, linux-pci,
	linux-kernel

On Tue, Jul 01, 2025 at 05:38:56PM +0530, Manivannan Sadhasivam wrote:
> dw_pcie_ptm_ops is not used outside of this file, so make it static. This
> also fixes the sparse warning:
> 
>   drivers/pci/controller/dwc/pcie-designware-debugfs.c:868:27: warning: symbol 'dw_pcie_ptm_ops' was not declared. Should it be static?
> 
> Fixes: 852a1fdd34a8 ("PCI: dwc: Add debugfs support for PTM context")
> Reported-by: Bjorn Helgaas <helgaas@kernel.org>
> Closes: https://lore.kernel.org/linux-pci/20250617231210.GA1172093@bhelgaas
> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>

Thanks, looks good to me.

> ---
>  drivers/pci/controller/dwc/pcie-designware-debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-debugfs.c b/drivers/pci/controller/dwc/pcie-designware-debugfs.c
> index c67601096c48..7356b0f6a2ad 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-debugfs.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-debugfs.c
> @@ -865,7 +865,7 @@ static bool dw_pcie_ptm_t4_visible(void *drvdata)
>  	return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
>  }
>  
> -const struct pcie_ptm_ops dw_pcie_ptm_ops = {
> +static const struct pcie_ptm_ops dw_pcie_ptm_ops = {
>  	.check_capability = dw_pcie_ptm_check_capability,
>  	.context_update_write = dw_pcie_ptm_context_update_write,
>  	.context_update_read = dw_pcie_ptm_context_update_read,
> -- 
> 2.45.2
> 

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

* Re: [PATCH] PCI: dwc: Make dw_pcie_ptm_ops static
  2025-07-01 12:08 [PATCH] PCI: dwc: Make dw_pcie_ptm_ops static Manivannan Sadhasivam
  2025-07-01 16:39 ` Bjorn Helgaas
@ 2025-07-07  7:55 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2025-07-07  7:55 UTC (permalink / raw)
  To: lpieralisi, jingoohan1, kwilczynski, bhelgaas
  Cc: robh, linux-pci, linux-kernel, Bjorn Helgaas

On Tue, Jul 01, 2025 at 05:38:56PM GMT, Manivannan Sadhasivam wrote:
> dw_pcie_ptm_ops is not used outside of this file, so make it static. This
> also fixes the sparse warning:
> 
>   drivers/pci/controller/dwc/pcie-designware-debugfs.c:868:27: warning: symbol 'dw_pcie_ptm_ops' was not declared. Should it be static?
> 
> Fixes: 852a1fdd34a8 ("PCI: dwc: Add debugfs support for PTM context")
> Reported-by: Bjorn Helgaas <helgaas@kernel.org>
> Closes: https://lore.kernel.org/linux-pci/20250617231210.GA1172093@bhelgaas
> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>

Applied to pci/controller/dwc!

- Mani

> ---
>  drivers/pci/controller/dwc/pcie-designware-debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-debugfs.c b/drivers/pci/controller/dwc/pcie-designware-debugfs.c
> index c67601096c48..7356b0f6a2ad 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-debugfs.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-debugfs.c
> @@ -865,7 +865,7 @@ static bool dw_pcie_ptm_t4_visible(void *drvdata)
>  	return (pci->mode == DW_PCIE_EP_TYPE) ? true : false;
>  }
>  
> -const struct pcie_ptm_ops dw_pcie_ptm_ops = {
> +static const struct pcie_ptm_ops dw_pcie_ptm_ops = {
>  	.check_capability = dw_pcie_ptm_check_capability,
>  	.context_update_write = dw_pcie_ptm_context_update_write,
>  	.context_update_read = dw_pcie_ptm_context_update_read,
> -- 
> 2.45.2
> 

-- 
மணிவண்ணன் சதாசிவம்

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

end of thread, other threads:[~2025-07-07  7:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01 12:08 [PATCH] PCI: dwc: Make dw_pcie_ptm_ops static Manivannan Sadhasivam
2025-07-01 16:39 ` Bjorn Helgaas
2025-07-07  7:55 ` Manivannan Sadhasivam

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