From 0e805e8b007d42502dbb7b883cae4794890a40ff Mon Sep 17 00:00:00 2001 From: Nai-Chen Cheng Date: Wed, 6 Aug 2025 14:27:11 +0800 Subject: [PATCH] greybus: svc: use string choice helpers instead of ternary operator Replace ternary operator with str_enabled_disabled() helper to improve code readability and consistency. Generated using Coccinelle semantic patch. Signed-off-by: Nai-Chen Cheng Reviewed-by: Alex Elder Link: https://lore.kernel.org/r/20250806-greybus-string-choices-v1-1-3e1c91048b62@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/greybus/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c index 4256467fcd359..35ea7147dca6c 100644 --- a/drivers/greybus/svc.c +++ b/drivers/greybus/svc.c @@ -10,6 +10,7 @@ #include #include #include +#include #define SVC_INTF_EJECT_TIMEOUT 9000 #define SVC_INTF_ACTIVATE_TIMEOUT 6000 @@ -73,7 +74,7 @@ static ssize_t watchdog_show(struct device *dev, struct device_attribute *attr, struct gb_svc *svc = to_gb_svc(dev); return sprintf(buf, "%s\n", - gb_svc_watchdog_enabled(svc) ? "enabled" : "disabled"); + str_enabled_disabled(gb_svc_watchdog_enabled(svc))); } static ssize_t watchdog_store(struct device *dev, -- 2.47.3