* [PATCH net-next] r8169: use str_enabled_disabled() helper
@ 2026-09-08 20:03 Gabriel Windlin
2026-09-11 1:44 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Windlin @ 2026-09-08 20:03 UTC (permalink / raw)
To: Heiner Kallweit, nic_swsd, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
Cc: Gabriel Windlin
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 <gawindlin@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-11 1:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 20:03 [PATCH net-next] r8169: use str_enabled_disabled() helper Gabriel Windlin
2026-09-11 1:44 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox