drivers/pci/controller/dwc/pcie-designware-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
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 > -- மணிவண்ணன் சதாசிவம்
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 >
© 2016 - 2025 Red Hat, Inc.