Skip to contentSkip to conversation

bus: imx-weim: Mark weim_of_notifier static

PATCH In review Shawn Guo 2 participants 3 messages Apr 11, 2022 Arm i.MX and Layerscape

lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

PATCH 1/1 bus: imx-weim: Mark weim_of_notifier static

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?

Fixes e6cb5408289f ("bus: imx-weim: add DT overlay support for WEIM bus")
---
 drivers/bus/imx-weim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/imx-weim.c +1 -1
index 60fbd42041dd..d10c9f1031b6 100644
@@ -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) */
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

Hi, Shawn!

Quoted 28 lines · Shawn Guo

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?

Fixes e6cb5408289f ("bus: imx-weim: add DT overlay support for WEIM bus")
---
 drivers/bus/imx-weim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/imx-weim.c +1 -1
index 60fbd42041dd..d10c9f1031b6 100644
@@ -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) */
Signature · 1 line
2.25.1

There was a similar patch already.
See: https://lore.kernel.org/all/[email protected]/

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author
#2 lore raw
Quoted 23 lines · Ivan Bornyakov

Hi, Shawn!

Quoted 20 lines · Shawn Guo

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?

Fixes e6cb5408289f ("bus: imx-weim: add DT overlay support for WEIM bus")
---
 drivers/bus/imx-weim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/imx-weim.c +0 -0
index 60fbd42041dd..d10c9f1031b6 100644
@@ -370,7 +370,7 @@ static int of_weim_notify(struct notifier_block *nb, unsigned long action,
 	return ret;
 }
 
Quoted 11 lines
Quoted 8 lines
drivers/bus/imx-weim.c +1 -1
-struct notifier_block weim_of_notifier = {
+static struct notifier_block weim_of_notifier = {
 	.notifier_call = of_weim_notify,
 };
 #endif /* IS_ENABLED(CONFIG_OF_DYNAMIC) */
Signature · 1 line
2.25.1

There was a similar patch already.
See: https://lore.kernel.org/all/[email protected]/

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

Shawn

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel