hwmon: (lm75) Add explicit default cases in lm75_is_visible()
PATCH 1/1 hwmon: (lm75) Add explicit default cases in lm75_is_visible()
Add explicit default labels to switch statements in lm75_is_visible().
This makes the control flow explicit and improves
readability, but also keeps consistency to other
usage of the switch statement in the driver.
Signed-off-by Flaviu Nistor <[email protected]>
--- drivers/hwmon/lm75.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/hwmon/lm75.c +4 -0
@@ -539,6 +539,8 @@ static umode_t lm75_is_visible(const void *data, enum hwmon_sensor_types type,if (config_data->params->num_sample_times >1 )return 0644 ;return 0444 ; +default : +break ; }break ;case hwmon_temp:
@@ -555,6 +557,8 @@ static umode_t lm75_is_visible(const void *data, enum hwmon_sensor_types type,if (config_data->params->alarm)return 0444 ;break ; +default : +break ; }break ;default :
Signature · 1 line
2.34.1
Quoted 8 lines · Flaviu Nistor
Add explicit default labels to switch statements in
lm75_is_visible().This makes the control flow explicit and improves
readability, but also keeps consistency to other
usage of the switch statement in the driver.Signed-off-by Flaviu Nistor <[email protected]>
Applied.
Thanks,
Guenter