linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: mt7621: declare 'mt7621_pci_ops' static
@ 2021-11-17 15:29 Sergio Paracuellos
  2021-11-17 21:14 ` Krzysztof Wilczyński
  2021-11-29 18:06 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 4+ messages in thread
From: Sergio Paracuellos @ 2021-11-17 15:29 UTC (permalink / raw)
  To: linux-pci; +Cc: lorenzo.pieralisi, bhelgaas, linux-kernel, kernel test robot

Sparse complains about 'mt7621_pci_ops' symbol is not declared and asks if
it should be declared as 'static' instead. Sparse is right. Hence declare
symbol as static.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 drivers/pci/controller/pcie-mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
index b60dfb45ef7b..4138c0e83513 100644
--- a/drivers/pci/controller/pcie-mt7621.c
+++ b/drivers/pci/controller/pcie-mt7621.c
@@ -148,7 +148,7 @@ static void __iomem *mt7621_pcie_map_bus(struct pci_bus *bus,
 	return pcie->base + RALINK_PCI_CONFIG_DATA + (where & 3);
 }
 
-struct pci_ops mt7621_pci_ops = {
+static struct pci_ops mt7621_pci_ops = {
 	.map_bus	= mt7621_pcie_map_bus,
 	.read		= pci_generic_config_read,
 	.write		= pci_generic_config_write,
-- 
2.33.0


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

* Re: [PATCH] PCI: mt7621: declare 'mt7621_pci_ops' static
  2021-11-17 15:29 [PATCH] PCI: mt7621: declare 'mt7621_pci_ops' static Sergio Paracuellos
@ 2021-11-17 21:14 ` Krzysztof Wilczyński
  2021-11-18  5:08   ` Sergio Paracuellos
  2021-11-29 18:06 ` Lorenzo Pieralisi
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Wilczyński @ 2021-11-17 21:14 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: linux-pci, lorenzo.pieralisi, bhelgaas, linux-kernel, kernel test robot

Hi,

> Sparse complains about 'mt7621_pci_ops' symbol is not declared and asks if
> it should be declared as 'static' instead. Sparse is right. Hence declare
> symbol as static.

Thank you for taking care of this!

[...]
> -struct pci_ops mt7621_pci_ops = {
> +static struct pci_ops mt7621_pci_ops = {
>  	.map_bus	= mt7621_pcie_map_bus,
>  	.read		= pci_generic_config_read,
>  	.write		= pci_generic_config_write,

Thank you!

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

	Krzysztof

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

* Re: [PATCH] PCI: mt7621: declare 'mt7621_pci_ops' static
  2021-11-17 21:14 ` Krzysztof Wilczyński
@ 2021-11-18  5:08   ` Sergio Paracuellos
  0 siblings, 0 replies; 4+ messages in thread
From: Sergio Paracuellos @ 2021-11-18  5:08 UTC (permalink / raw)
  To: Krzysztof Wilczyński
  Cc: linux-pci, Lorenzo Pieralisi, Bjorn Helgaas, linux-kernel,
	kernel test robot

Hi Krzysztof,

On Wed, Nov 17, 2021 at 10:14 PM Krzysztof Wilczyński <kw@linux.com> wrote:
>
> Hi,
>
> > Sparse complains about 'mt7621_pci_ops' symbol is not declared and asks if
> > it should be declared as 'static' instead. Sparse is right. Hence declare
> > symbol as static.
>
> Thank you for taking care of this!
>
> [...]
> > -struct pci_ops mt7621_pci_ops = {
> > +static struct pci_ops mt7621_pci_ops = {
> >       .map_bus        = mt7621_pcie_map_bus,
> >       .read           = pci_generic_config_read,
> >       .write          = pci_generic_config_write,
>
> Thank you!
>
> Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Thanks!

Best regards,
     Sergio Paracuellos

>
>         Krzysztof

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

* Re: [PATCH] PCI: mt7621: declare 'mt7621_pci_ops' static
  2021-11-17 15:29 [PATCH] PCI: mt7621: declare 'mt7621_pci_ops' static Sergio Paracuellos
  2021-11-17 21:14 ` Krzysztof Wilczyński
@ 2021-11-29 18:06 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2021-11-29 18:06 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: linux-pci, bhelgaas, linux-kernel, kernel test robot

On Wed, Nov 17, 2021 at 04:29:52PM +0100, Sergio Paracuellos wrote:
> Sparse complains about 'mt7621_pci_ops' symbol is not declared and asks if
> it should be declared as 'static' instead. Sparse is right. Hence declare
> symbol as static.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---
>  drivers/pci/controller/pcie-mt7621.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to pci/mt7621, thanks.

Lorenzo

> 
> diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> index b60dfb45ef7b..4138c0e83513 100644
> --- a/drivers/pci/controller/pcie-mt7621.c
> +++ b/drivers/pci/controller/pcie-mt7621.c
> @@ -148,7 +148,7 @@ static void __iomem *mt7621_pcie_map_bus(struct pci_bus *bus,
>  	return pcie->base + RALINK_PCI_CONFIG_DATA + (where & 3);
>  }
>  
> -struct pci_ops mt7621_pci_ops = {
> +static struct pci_ops mt7621_pci_ops = {
>  	.map_bus	= mt7621_pcie_map_bus,
>  	.read		= pci_generic_config_read,
>  	.write		= pci_generic_config_write,
> -- 
> 2.33.0
> 

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

end of thread, other threads:[~2021-11-29 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 15:29 [PATCH] PCI: mt7621: declare 'mt7621_pci_ops' static Sergio Paracuellos
2021-11-17 21:14 ` Krzysztof Wilczyński
2021-11-18  5:08   ` Sergio Paracuellos
2021-11-29 18:06 ` Lorenzo Pieralisi

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