diff mbox series

bus: imx-weim: Mark weim_of_notifier static

Message ID 20220411025618.387648-1-shawnguo@kernel.org (mailing list archive)
State New, archived
Headers show
Series bus: imx-weim: Mark weim_of_notifier static | expand

Commit Message

Shawn Guo April 11, 2022, 2:56 a.m. UTC
Mark weim_of_notifier static to fix the sparse warning below.

drivers/bus/imx-weim.c:373:23: sparse: sparse: symbol 'weim_of_notifier'
was not declared. Should it be static?

Reported-by: kernel test robot <lkp@intel.com>
Fixes: e6cb5408289f ("bus: imx-weim: add DT overlay support for WEIM bus")
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
---
 drivers/bus/imx-weim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ivan Bornyakov April 11, 2022, 7:45 a.m. UTC | #1
Hi, Shawn!

On Mon, Apr 11, 2022 at 10:56:18AM +0800, Shawn Guo wrote:
> Mark weim_of_notifier static to fix the sparse warning below.
> 
> drivers/bus/imx-weim.c:373:23: sparse: sparse: symbol 'weim_of_notifier'
> was not declared. Should it be static?
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: e6cb5408289f ("bus: imx-weim: add DT overlay support for WEIM bus")
> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
> ---
>  drivers/bus/imx-weim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
> index 60fbd42041dd..d10c9f1031b6 100644
> --- a/drivers/bus/imx-weim.c
> +++ b/drivers/bus/imx-weim.c
> @@ -370,7 +370,7 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action,
>  	return ret;
>  }
>  
> -struct notifier_block weim_of_notifier = {
> +static struct notifier_block weim_of_notifier = {
>  	.notifier_call = of_weim_notify,
>  };
>  #endif /* IS_ENABLED(CONFIG_OF_DYNAMIC) */
> -- 
> 2.25.1
> 

There was a similar patch already.
See: https://lore.kernel.org/all/20220226094333.3269016-1-weiyongjun1@huawei.com/
Shawn Guo April 11, 2022, 8:06 a.m. UTC | #2
On Mon, Apr 11, 2022 at 10:45:25AM +0300, Ivan Bornyakov wrote:
> Hi, Shawn!
> 
> On Mon, Apr 11, 2022 at 10:56:18AM +0800, Shawn Guo wrote:
> > Mark weim_of_notifier static to fix the sparse warning below.
> > 
> > drivers/bus/imx-weim.c:373:23: sparse: sparse: symbol 'weim_of_notifier'
> > was not declared. Should it be static?
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Fixes: e6cb5408289f ("bus: imx-weim: add DT overlay support for WEIM bus")
> > Signed-off-by: Shawn Guo <shawnguo@kernel.org>
> > ---
> >  drivers/bus/imx-weim.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
> > index 60fbd42041dd..d10c9f1031b6 100644
> > --- a/drivers/bus/imx-weim.c
> > +++ b/drivers/bus/imx-weim.c
> > @@ -370,7 +370,7 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action,
> >  	return ret;
> >  }
> >  
> > -struct notifier_block weim_of_notifier = {
> > +static struct notifier_block weim_of_notifier = {
> >  	.notifier_call = of_weim_notify,
> >  };
> >  #endif /* IS_ENABLED(CONFIG_OF_DYNAMIC) */
> > -- 
> > 2.25.1
> > 
> 
> There was a similar patch already.
> See: https://lore.kernel.org/all/20220226094333.3269016-1-weiyongjun1@huawei.com/

Ah, for some reason, the patch did not appear in my mailbox.  Thanks for
point it to me!  Applied that instead.

Shawn
diff mbox series

Patch

diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
index 60fbd42041dd..d10c9f1031b6 100644
--- a/drivers/bus/imx-weim.c
+++ b/drivers/bus/imx-weim.c
@@ -370,7 +370,7 @@  static int of_weim_notify(struct notifier_block *nb, unsigned long action,
 	return ret;
 }
 
-struct notifier_block weim_of_notifier = {
+static struct notifier_block weim_of_notifier = {
 	.notifier_call = of_weim_notify,
 };
 #endif /* IS_ENABLED(CONFIG_OF_DYNAMIC) */