From: Flaviu Nistor <flaviu.nistor@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Flaviu Nistor <flaviu.nistor@gmail.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] hwmon: (lm75) Add explicit default cases in lm75_is_visible()
Date: Fri, 17 Apr 2026 08:57:00 +0300 [thread overview]
Message-ID: <20260417055700.5739-1-flaviu.nistor@gmail.com> (raw)
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
reply other threads:[~2026-04-17 5:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260417055700.5739-1-flaviu.nistor@gmail.com \
--to=flaviu.nistor@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox