* [PATCH] hwmon: (lm75) Add explicit default cases in lm75_is_visible()
@ 2026-04-17 5:57 Flaviu Nistor
0 siblings, 0 replies; only message in thread
From: Flaviu Nistor @ 2026-04-17 5:57 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Flaviu Nistor, linux-hwmon, linux-kernel
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 <flaviu.nistor@gmail.com>
---
drivers/hwmon/lm75.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index f1a1e5b888f6..e132501bbfdf 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -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:
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-17 5:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-17 5:57 [PATCH] hwmon: (lm75) Add explicit default cases in lm75_is_visible() Flaviu Nistor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox