* [PATCH] hwmon: (dme1737) Use str_yes_no() helper in dme1737_init_device()
@ 2026-11-09 12:11 Archit More
2026-11-09 12:14 ` sashiko-bot
2026-11-09 15:01 ` Guenter Roeck
0 siblings, 2 replies; 3+ messages in thread
From: Archit More @ 2026-11-09 12:11 UTC (permalink / raw)
To: Juerg Haefliger, Guenter Roeck; +Cc: linux-hwmon, linux-kernel, Archit More
Replace open-coded ternary string choices ("yes" / "no") with the
standard str_yes_no() helper from <linux/string_choices.h>.
Signed-off-by: Archit More <architmore303@gmail.com>
---
drivers/hwmon/dme1737.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c
index b1bd3682c5fb..c3bf5f4ef941 100644
--- a/drivers/hwmon/dme1737.c
+++ b/drivers/hwmon/dme1737.c
@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/platform_device.h>
@@ -2316,13 +2317,13 @@ static int dme1737_init_device(struct device *dev)
dev_info(dev,
"Optional features: pwm3=%s, pwm5=%s, pwm6=%s, fan3=%s, fan4=%s, fan5=%s, fan6=%s.\n",
- (data->has_features & HAS_PWM(2)) ? "yes" : "no",
- (data->has_features & HAS_PWM(4)) ? "yes" : "no",
- (data->has_features & HAS_PWM(5)) ? "yes" : "no",
- (data->has_features & HAS_FAN(2)) ? "yes" : "no",
- (data->has_features & HAS_FAN(3)) ? "yes" : "no",
- (data->has_features & HAS_FAN(4)) ? "yes" : "no",
- (data->has_features & HAS_FAN(5)) ? "yes" : "no");
+ str_yes_no(data->has_features & HAS_PWM(2)),
+ str_yes_no(data->has_features & HAS_PWM(4)),
+ str_yes_no(data->has_features & HAS_PWM(5)),
+ str_yes_no(data->has_features & HAS_FAN(2)),
+ str_yes_no(data->has_features & HAS_FAN(3)),
+ str_yes_no(data->has_features & HAS_FAN(4)),
+ str_yes_no(data->has_features & HAS_FAN(5)));
reg = dme1737_read(data, DME1737_REG_TACH_PWM);
/* Inform if fan-to-pwm mapping differs from the default */
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] hwmon: (dme1737) Use str_yes_no() helper in dme1737_init_device()
2026-11-09 12:11 [PATCH] hwmon: (dme1737) Use str_yes_no() helper in dme1737_init_device() Archit More
@ 2026-11-09 12:14 ` sashiko-bot
2026-11-09 15:01 ` Guenter Roeck
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-09 12:14 UTC (permalink / raw)
To: Archit More; +Cc: linux-hwmon
> Replace open-coded ternary string choices ("yes" / "no") with the
> standard str_yes_no() helper from <linux/string_choices.h>.
>
> Signed-off-by: Archit More <architmore303@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261109121127.10937-1-architmore303@gmail.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] hwmon: (dme1737) Use str_yes_no() helper in dme1737_init_device()
2026-11-09 12:11 [PATCH] hwmon: (dme1737) Use str_yes_no() helper in dme1737_init_device() Archit More
2026-11-09 12:14 ` sashiko-bot
@ 2026-11-09 15:01 ` Guenter Roeck
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2026-11-09 15:01 UTC (permalink / raw)
To: Archit More, Juerg Haefliger; +Cc: linux-hwmon, linux-kernel
On 11/9/26 04:11, Archit More wrote:
> Replace open-coded ternary string choices ("yes" / "no") with the
> standard str_yes_no() helper from <linux/string_choices.h>.
>
> Signed-off-by: Archit More <architmore303@gmail.com>
Please refrain from submitting such patches. I will not apply them.
The Linux kernel is known to have thousands of bugs. If you want
to do some good, concentrate on fixing some of those.
Thanks,
Guenter
> ---
> drivers/hwmon/dme1737.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c
> index b1bd3682c5fb..c3bf5f4ef941 100644
> --- a/drivers/hwmon/dme1737.c
> +++ b/drivers/hwmon/dme1737.c
> @@ -17,6 +17,7 @@
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/slab.h>
> +#include <linux/string_choices.h>
> #include <linux/jiffies.h>
> #include <linux/i2c.h>
> #include <linux/platform_device.h>
> @@ -2316,13 +2317,13 @@ static int dme1737_init_device(struct device *dev)
>
> dev_info(dev,
> "Optional features: pwm3=%s, pwm5=%s, pwm6=%s, fan3=%s, fan4=%s, fan5=%s, fan6=%s.\n",
> - (data->has_features & HAS_PWM(2)) ? "yes" : "no",
> - (data->has_features & HAS_PWM(4)) ? "yes" : "no",
> - (data->has_features & HAS_PWM(5)) ? "yes" : "no",
> - (data->has_features & HAS_FAN(2)) ? "yes" : "no",
> - (data->has_features & HAS_FAN(3)) ? "yes" : "no",
> - (data->has_features & HAS_FAN(4)) ? "yes" : "no",
> - (data->has_features & HAS_FAN(5)) ? "yes" : "no");
> + str_yes_no(data->has_features & HAS_PWM(2)),
> + str_yes_no(data->has_features & HAS_PWM(4)),
> + str_yes_no(data->has_features & HAS_PWM(5)),
> + str_yes_no(data->has_features & HAS_FAN(2)),
> + str_yes_no(data->has_features & HAS_FAN(3)),
> + str_yes_no(data->has_features & HAS_FAN(4)),
> + str_yes_no(data->has_features & HAS_FAN(5)));
>
> reg = dme1737_read(data, DME1737_REG_TACH_PWM);
> /* Inform if fan-to-pwm mapping differs from the default */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-09 15:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 12:11 [PATCH] hwmon: (dme1737) Use str_yes_no() helper in dme1737_init_device() Archit More
2026-11-09 12:14 ` sashiko-bot
2026-11-09 15:01 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).