From: Andy Shevchenko Date: Mon, 16 Dec 2019 17:38:50 +0000 (+0200) Subject: iio: pressure: st_press: Mark default_press_pdata with __maybe_unused X-Git-Tag: v5.6-rc1~138^2~128^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be4ac8321ff2c0085573500ce819e80cfa38d770;p=thirdparty%2Fkernel%2Flinux.git iio: pressure: st_press: Mark default_press_pdata with __maybe_unused Since we put static variable to a header file it's copied to each module that includes the header. But not all of them are actually used it. Mark default_press_pdata with __maybe_unused to calm a compiler down: In file included from drivers/iio/pressure/st_pressure_spi.c:18: drivers/iio/pressure/st_pressure.h:40:46: warning: ‘default_press_pdata’ defined but not used [-Wunused-const-variable=] 40 | static const struct st_sensors_platform_data default_press_pdata = { | ^~~~~~~~~~~~~~~~~~~ ... Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/pressure/st_pressure.h b/drivers/iio/pressure/st_pressure.h index c2e47a6c31187..5c746ff6087e0 100644 --- a/drivers/iio/pressure/st_pressure.h +++ b/drivers/iio/pressure/st_pressure.h @@ -37,7 +37,7 @@ enum st_press_type { * struct st_sensors_platform_data - default press platform data * @drdy_int_pin: default press DRDY is available on INT1 pin. */ -static const struct st_sensors_platform_data default_press_pdata = { +static __maybe_unused const struct st_sensors_platform_data default_press_pdata = { .drdy_int_pin = 1, };