[PATCH net-next] r8169: use str_enabled_disabled() helper
From: Gabriel Windlin <hidden>
Date: 2026-09-08 20:03:39
Replace the open-coded ternary condition (? "enabled" : "disabled") with the str_enabled_disabled() helper from <linux/string_choices.h> to improve code readability and maintain uniform string representation. Signed-off-by: Gabriel Windlin <redacted> --- drivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 5415ff62a286..360df5284042 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c@@ -30,6 +30,7 @@ #include <linux/prefetch.h> #include <linux/ipv6.h> #include <linux/unaligned.h> +#include <linux/string_choices.h> #include <net/ip6_checksum.h> #include <net/netdev_queues.h>
@@ -6225,7 +6226,7 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (tp->dash_type != RTL_DASH_NONE) { netdev_info(dev, "DASH %s\n", - tp->dash_enabled ? "enabled" : "disabled"); + str_enabled_disabled(tp->dash_enabled)); rtl8168_driver_start(tp); }
base-commit: ab217fbb9b2169ce677b09a66558d5c3adcfbb76 -- 2.55.0