aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/rbtree.py
diff options
context:
space:
mode:
authorSerge Semin <[email protected]>2020-06-03 03:07:53 +0300
committerGuenter Roeck <[email protected]>2020-06-23 06:29:32 -0700
commit332516947ef83343b9bcc7275ff99db392592c94 (patch)
tree37ac00941300679a35ecdbe4483f58690bd571f3 /scripts/gdb/linux/rbtree.py
parent48778464bb7d346b47157d21ffde2af6b2d39110 (diff)
hwmon: (bt1-pvt) Define Temp- and Volt-to-N poly as maybe-unused
Clang-based kernel building with W=1 warns that some static const variables are unused: drivers/hwmon/bt1-pvt.c:67:30: warning: unused variable 'poly_temp_to_N' [-Wunused-const-variable] static const struct pvt_poly poly_temp_to_N = { ^ drivers/hwmon/bt1-pvt.c:99:30: warning: unused variable 'poly_volt_to_N' [-Wunused-const-variable] static const struct pvt_poly poly_volt_to_N = { ^ Indeed these polynomials are utilized only when the PVT sensor alarms are enabled. In that case they are used to convert the temperature and voltage alarm limits from normal quantities (Volts and degree Celsius) to the sensor data representation N = [0, 1023]. Otherwise when alarms are disabled the driver only does the detected data conversion to the human readable form and doesn't need that polynomials defined. So let's mark the Temp-to-N and Volt-to-N polynomials with __maybe_unused attribute. Note gcc with W=1 doesn't notice the problem. Fixes: 87976ce2825d ("hwmon: Add Baikal-T1 PVT sensor driver") Reported-by: kbuild test robot <[email protected]> Signed-off-by: Serge Semin <[email protected]> Cc: Maxim Kaurkin <[email protected]> Cc: Alexey Malahov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/rbtree.py')
0 files changed, 0 insertions, 0 deletions