iio: light: make a couple of config structures static
Subsystems (2)
PATCH 1/1 iio: light: make a couple of config structures static
From: Colin Ian King <[email protected]>
Structures st_uvis25_i2c_regmap_config and st_uvis25_spi_regmap_config are local to the source and do not need to be in global scope, so make them both static.
Cleans up sparse warnings:
warning: symbol 'st_uvis25_i2c_regmap_config' was not declared. Should it be static?
warning: symbol 'st_uvis25_spi_regmap_config' was not declared. Should it be static?
--- drivers/iio/light/st_uvis25_i2c.c | 2 +- drivers/iio/light/st_uvis25_spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/st_uvis25_i2c.c +1 -1
@@ -19,7 +19,7 @@#define UVIS25_I2C_AUTO_INCREMENT BIT(7) -const struct regmap_config st_uvis25_i2c_regmap_config = { +static const struct regmap_config st_uvis25_i2c_regmap_config = { .reg_bits =8 , .val_bits =8 , .write_flag_mask =UVIS25_I2C_AUTO_INCREMENT ,
drivers/iio/light/st_uvis25_spi.c +1 -1
@@ -19,7 +19,7 @@#define UVIS25_SENSORS_SPI_READ BIT(7)#define UVIS25_SPI_AUTO_INCREMENT BIT(6) -const struct regmap_config st_uvis25_spi_regmap_config = { +static const struct regmap_config st_uvis25_spi_regmap_config = { .reg_bits =8 , .val_bits =8 , .read_flag_mask =UVIS25_SENSORS_SPI_READ |UVIS25_SPI_AUTO_INCREMENT ,
Signature · 1 line
2.14.1
Jonathan Cameron
maintainerQuoted 6 lines · On Mon, 4 Dec 2017 12:04:06 +0000 Colin King <[email protected]> wrote:
From: Colin Ian King <[email protected]>
Structures
st_uvis25_i2c_regmap_configandst_uvis25_spi_regmap_configare local to the source and do not need to be in global scope, so make them both static.
Quoted 7 lines
Cleans up sparse warnings:
warning: symbol 'st_uvis25_i2c_regmap_config' was not declared. Should it be static?
warning: symbol 'st_uvis25_spi_regmap_config' was not declared. Should it be static?Signed-off-by Colin Ian King <[email protected]>
Thanks Colin,
Not sure why I missed these when running build tests and they got past 0-day. Ah well.. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with them.
Thanks,
Jonathan
Quoted 31 lines
--- drivers/iio/light/st_uvis25_i2c.c | 2 +- drivers/iio/light/st_uvis25_spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/iio/light/st_uvis25_i2c.c +1
-1@@ -19,7 +19,7 @@#define UVIS25_I2C_AUTO_INCREMENT BIT(7) -const struct regmap_config st_uvis25_i2c_regmap_config = { +static const struct regmap_config st_uvis25_i2c_regmap_config = { .reg_bits =8 , .val_bits =8 , .write_flag_mask =UVIS25_I2C_AUTO_INCREMENT ,drivers/iio/light/st_uvis25_spi.c +1
-1@@ -19,7 +19,7 @@#define UVIS25_SENSORS_SPI_READ BIT(7)#define UVIS25_SPI_AUTO_INCREMENT BIT(6) -const struct regmap_config st_uvis25_spi_regmap_config = { +static const struct regmap_config st_uvis25_spi_regmap_config = { .reg_bits =8 , .val_bits =8 , .read_flag_mask =UVIS25_SENSORS_SPI_READ |UVIS25_SPI_AUTO_INCREMENT ,