Skip to contentSkip to conversation

PCI: dwc: Make dw_pcie_ptm_ops static

PATCH Applied Manivannan Sadhasivam 2 participants 3 messages Jul 1, 2025 – Jul 7, 2025

Subsystems (3)
lore
Share & tools
lore

Manivannan Sadhasivam

author maintainer
#0 lore raw

PATCH 1/1 PCI: dwc: Make dw_pcie_ptm_ops static

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")
---
 drivers/pci/controller/dwc/pcie-designware-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware-debugfs.c +1 -1
index c67601096c48..7356b0f6a2ad 100644
@@ -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,
Signature · 1 line
2.45.2
#1 lore raw
Quoted 9 lines · Manivannan Sadhasivam

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

Thanks, looks good to me.

Quoted 20 lines
---
 drivers/pci/controller/dwc/pcie-designware-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware-debugfs.c +1 -1
index c67601096c48..7356b0f6a2ad 100644
@@ -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,
Signature · 1 line
2.45.2
author maintainer Applied
#2 lore raw
In reply to Manivannan Sadhasivam
Quoted 9 lines · Manivannan Sadhasivam

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

Applied to pci/controller/dwc!

- Mani

Quoted 20 lines
---
 drivers/pci/controller/dwc/pcie-designware-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-designware-debugfs.c +1 -1
index c67601096c48..7356b0f6a2ad 100644
@@ -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,
Signature · 1 line
2.45.2
Signature · 1 line
மணிவண்ணன் சதாசிவம்