mfd: arizona: Make some symbols static
Subsystems (2)
PATCH 1/1 mfd: arizona: Make some symbols static
The sparse tool complains as follows:
drivers/mfd/arizona-spi.c:28:31: warning:
symbol 'reset_gpios' was not declared. Should it be static?drivers/mfd/arizona-spi.c:29:31: warning:
symbol 'ldoena_gpios' was not declared. Should it be static?
Those symbols are not used outside of arizona-spi.c, so this commit marks them static.
--- drivers/mfd/arizona-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/arizona-spi.c +2 -2
@@ -25,8 +25,8 @@#include "arizona.h" #ifdef CONFIG_ACPI -const struct acpi_gpio_params reset_gpios = {1 ,0 , false }; -const struct acpi_gpio_params ldoena_gpios = {2 ,0 , false }; +static const struct acpi_gpio_params reset_gpios = {1 ,0 , false }; +static const struct acpi_gpio_params ldoena_gpios = {2 ,0 , false };static const struct acpi_gpio_mapping arizona_acpi_gpios[] = { { "reset-gpios", &reset_gpios, 1, },
Hi,
Quoted 7 lines · Wei Yongjun
The sparse tool complains as follows:
drivers/mfd/arizona-spi.c:28:31: warning:
symbol 'reset_gpios' was not declared. Should it be static?drivers/mfd/arizona-spi.c:29:31: warning:
symbol 'ldoena_gpios' was not declared. Should it be static?
Quoted 6 lines
Those symbols are not used outside of
arizona-spi.c, so this commit marks them static.Fixes e933836744a2 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>
Thank you for catching this.
Patch looks good to me:
Regards,
Hans
Quoted 20 lines
--- drivers/mfd/arizona-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mfd/arizona-spi.c +2
-2@@ -25,8 +25,8 @@#include "arizona.h" #ifdef CONFIG_ACPI -const struct acpi_gpio_params reset_gpios = {1 ,0 , false }; -const struct acpi_gpio_params ldoena_gpios = {2 ,0 , false }; +static const struct acpi_gpio_params reset_gpios = {1 ,0 , false }; +static const struct acpi_gpio_params ldoena_gpios = {2 ,0 , false };static const struct acpi_gpio_mapping arizona_acpi_gpios[] = { { "reset-gpios", &reset_gpios, 1, },
Quoted 7 lines · Wei Yongjun
The sparse tool complains as follows:
drivers/mfd/arizona-spi.c:28:31: warning:
symbol 'reset_gpios' was not declared. Should it be static?drivers/mfd/arizona-spi.c:29:31: warning:
symbol 'ldoena_gpios' was not declared. Should it be static?
Quoted 7 lines
Those symbols are not used outside of
arizona-spi.c, so this commit marks them static.Fixes e933836744a2 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>---
Thanks,
Charles
Lee Jones
AppliedQuoted 10 lines · Wei Yongjun
The sparse tool complains as follows:
drivers/mfd/arizona-spi.c:28:31: warning:
symbol 'reset_gpios' was not declared. Should it be static?drivers/mfd/arizona-spi.c:29:31: warning:
symbol 'ldoena_gpios' was not declared. Should it be static?Those symbols are not used outside of
arizona-spi.c, so this commit marks them static.
Quoted 6 lines
Fixes e933836744a2 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI")Reported-by Hulk Robot <[email protected]>Signed-off-by Wei Yongjun <[email protected]>--- drivers/mfd/arizona-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog