drivers/hwmon/dme1737.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
Remove the ternary operators and use str_yes_no() from string_choices.h
instead.
No functional change.
Signed-off-by: Joshua Crofts <joshua.crofts1@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 7e839308e58f..f28a9cfced55 100644
--- a/drivers/hwmon/dme1737.c
+++ b/drivers/hwmon/dme1737.c
@@ -27,6 +27,7 @@
#include <linux/mutex.h>
#include <linux/acpi.h>
#include <linux/io.h>
+#include <linux/string_choices.h>
/* ISA device, if found */
static struct platform_device *pdev;
@@ -2314,13 +2315,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 */
---
base-commit: ca078d004cf58137bcf8cb24a8b271397431ba58
change-id: 20260712-add-string-choices-dme1737-543445ef330d
Best regards,
--
Kind regards,
Joshua Crofts
On 7/12/26 10:58, Joshua Crofts wrote: > Remove the ternary operators and use str_yes_no() from string_choices.h > instead. > > No functional change. > > Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> This is an extremely old driver which does not support the latest hardware monitoring API. Please refrain from making non-functional changes in such drivers. NACK Thanks, Guenter
On Sun, 12 Jul 2026 at 20:17, Guenter Roeck <linux@roeck-us.net> wrote: > > On 7/12/26 10:58, Joshua Crofts wrote: > > Remove the ternary operators and use str_yes_no() from string_choices.h > > instead. > > > > No functional change. > > > > Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> > > This is an extremely old driver which does not support the latest > hardware monitoring API. > > Please refrain from making non-functional changes in such drivers. > > NACK Fair enough, apologies. -- Kind regards CJD
© 2016 - 2026 Red Hat, Inc.