From: Gabriel Windlin <gawindlin@gmail.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
nic_swsd@realtek.com, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Gabriel Windlin <gawindlin@gmail.com>
Subject: [PATCH net-next] r8169: use str_enabled_disabled() helper
Date: Tue, 8 Sep 2026 22:03:08 +0200 [thread overview]
Message-ID: <20260908200309.533537-1-gawindlin@gmail.com> (raw)
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
next reply other threads:[~2026-09-08 20:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 20:03 Gabriel Windlin [this message]
2026-09-11 1:44 ` [PATCH net-next] r8169: use str_enabled_disabled() helper Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260908200309.533537-1-gawindlin@gmail.com \
--to=gawindlin@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox