diff mbox series

[PATCHv3,5/5] pci: unexport pci_walk_bus_locked

Message ID 20241022224851.340648-6-kbusch@meta.com (mailing list archive)
State Accepted
Delegated to: Bjorn Helgaas
Headers show
Series pci cleanup/prep patches | expand

Commit Message

Keith Busch Oct. 22, 2024, 10:48 p.m. UTC
From: Keith Busch <kbusch@kernel.org>

There's only one user of this, and it's internal, so no need to export
it.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/pci/bus.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Bjorn Helgaas Oct. 23, 2024, 9:43 p.m. UTC | #1
On Tue, Oct 22, 2024 at 03:48:51PM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> There's only one user of this, and it's internal, so no need to export
> it.
> 
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
>  drivers/pci/bus.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
> index 9c552396241e0..d015d5821cefc 100644
> --- a/drivers/pci/bus.c
> +++ b/drivers/pci/bus.c
> @@ -445,7 +445,6 @@ void pci_walk_bus_locked(struct pci_bus *top, int (*cb)(struct pci_dev *, void *
>  
>  	__pci_walk_bus(top, cb, userdata);
>  }
> -EXPORT_SYMBOL_GPL(pci_walk_bus_locked);

I think we could also move the declaration from include/linux/pci.h to
drivers/pci/pci.h, right?

I guess there's some argument for keeping it in include/linux/pci.h
next to the pci_walk_bus() declaration, but I certainly don't want to
encourage more use of either one, especially outside the PCI core.
Keith Busch Oct. 23, 2024, 10 p.m. UTC | #2
On Wed, Oct 23, 2024 at 04:43:20PM -0500, Bjorn Helgaas wrote:
> On Tue, Oct 22, 2024 at 03:48:51PM -0700, Keith Busch wrote:
> > @@ -445,7 +445,6 @@ void pci_walk_bus_locked(struct pci_bus *top, int (*cb)(struct pci_dev *, void *
> >  
> >  	__pci_walk_bus(top, cb, userdata);
> >  }
> > -EXPORT_SYMBOL_GPL(pci_walk_bus_locked);
> 
> I think we could also move the declaration from include/linux/pci.h to
> drivers/pci/pci.h, right?
> 
> I guess there's some argument for keeping it in include/linux/pci.h
> next to the pci_walk_bus() declaration, but I certainly don't want to
> encourage more use of either one, especially outside the PCI core.

Thanks, that's a good point! Not only are modules not using this,
neither does any kernel code outside drivers/pci/, so no need to
declare this in include/linux/.
Bjorn Helgaas Oct. 23, 2024, 10:07 p.m. UTC | #3
On Wed, Oct 23, 2024 at 04:00:42PM -0600, Keith Busch wrote:
> On Wed, Oct 23, 2024 at 04:43:20PM -0500, Bjorn Helgaas wrote:
> > On Tue, Oct 22, 2024 at 03:48:51PM -0700, Keith Busch wrote:
> > > @@ -445,7 +445,6 @@ void pci_walk_bus_locked(struct pci_bus *top, int (*cb)(struct pci_dev *, void *
> > >  
> > >  	__pci_walk_bus(top, cb, userdata);
> > >  }
> > > -EXPORT_SYMBOL_GPL(pci_walk_bus_locked);
> > 
> > I think we could also move the declaration from include/linux/pci.h to
> > drivers/pci/pci.h, right?
> > 
> > I guess there's some argument for keeping it in include/linux/pci.h
> > next to the pci_walk_bus() declaration, but I certainly don't want to
> > encourage more use of either one, especially outside the PCI core.
> 
> Thanks, that's a good point! Not only are modules not using this,
> neither does any kernel code outside drivers/pci/, so no need to
> declare this in include/linux/.

I'll make this change locally so you don't need to repost for it.
diff mbox series

Patch

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 9c552396241e0..d015d5821cefc 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -445,7 +445,6 @@  void pci_walk_bus_locked(struct pci_bus *top, int (*cb)(struct pci_dev *, void *
 
 	__pci_walk_bus(top, cb, userdata);
 }
-EXPORT_SYMBOL_GPL(pci_walk_bus_locked);
 
 struct pci_bus *pci_bus_get(struct pci_bus *bus)
 {