Skip to contentSkip to conversation

mfd: ene-kb3930: Make symbol 'kb3930_power_off' static

PATCH Superseded Wei Yongjun 2 participants 2 messages Sep 9, 2020 Multifunction devices (MFD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: ene-kb3930: Make symbol 'kb3930_power_off' static

The sparse tool complains as follows:

drivers/mfd/ene-kb3930.c:36:15: warning:
symbol 'kb3930_power_off' was not declared. Should it be static?

This variable is not used outside of ene-kb3930.c, this commit marks it static.

Fixes 753bd752e181 ("mfd: ene-kb3930: Add driver for ENE KB3930 Embedded Controller")
---
 drivers/mfd/ene-kb3930.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/ene-kb3930.c +1 -1
index 1c32ff586816..eb7312bd6361 100644
@@ -33,7 +33,7 @@ struct kb3930 {
 	struct gpio_descs *off_gpios;
 };
 
-struct kb3930 *kb3930_power_off;
+static struct kb3930 *kb3930_power_off;
 
 #define EC_GPIO_WAVE		0
 #define EC_GPIO_OFF_MODE	1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Wei Yongjun

The sparse tool complains as follows:

drivers/mfd/ene-kb3930.c:36:15: warning:
symbol 'kb3930_power_off' was not declared. Should it be static?

This variable is not used outside of ene-kb3930.c, this commit marks it static.

Fixes 753bd752e181 ("mfd: ene-kb3930: Add driver for ENE KB3930 Embedded Controller")

Thank you!
Lubo

Quoted 18 lines
---
 drivers/mfd/ene-kb3930.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/ene-kb3930.c +1 -1
index 1c32ff586816..eb7312bd6361 100644
@@ -33,7 +33,7 @@ struct kb3930 {
 	struct gpio_descs *off_gpios;
 };
 
-struct kb3930 *kb3930_power_off;
+static struct kb3930 *kb3930_power_off;
 
 #define EC_GPIO_WAVE		0
 #define EC_GPIO_OFF_MODE	1