diff mbox series

PCI: mt7621: declare 'mt7621_pci_ops' static

Message ID 20211117152952.12271-1-sergio.paracuellos@gmail.com (mailing list archive)
State Accepted
Delegated to: Lorenzo Pieralisi
Headers show
Series PCI: mt7621: declare 'mt7621_pci_ops' static | expand

Commit Message

Sergio Paracuellos Nov. 17, 2021, 3:29 p.m. UTC
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(-)

Comments

Krzysztof Wilczyński Nov. 17, 2021, 9:14 p.m. UTC | #1
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
Sergio Paracuellos Nov. 18, 2021, 5:08 a.m. UTC | #2
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
Lorenzo Pieralisi Nov. 29, 2021, 6:06 p.m. UTC | #3
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
>
diff mbox series

Patch

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,