* [PATCH linux-next] net: e100: Use str_read_write() helper
@ 2025-05-15 12:44 long.yunjian
2025-05-15 13:35 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: long.yunjian @ 2025-05-15 12:44 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: przemyslaw.kitszel, andrew+netdev, davem, edumazet, kuba, pabeni,
intel-wired-lan, netdev, linux-kernel, fang.yumeng, xu.lifeng1,
ouyang.maochun, mou.yi
From: Yumeng Fang <fang.yumeng@zte.com.cn>
Remove hard-coded strings by using the str_read_write() helper.
Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn>
---
drivers/net/ethernet/intel/e100.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index c0ead54ea186..ab93caab72bb 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -147,6 +147,7 @@
#include <linux/firmware.h>
#include <linux/rtnetlink.h>
#include <linux/unaligned.h>
+#include <linux/string_choices.h>
#define DRV_NAME "e100"
@@ -946,7 +947,7 @@ static u16 mdio_ctrl_hw(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data)
spin_unlock_irqrestore(&nic->mdio_lock, flags);
netif_printk(nic, hw, KERN_DEBUG, nic->netdev,
"%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n",
- dir == mdi_read ? "READ" : "WRITE",
+ str_read_write(dir == mdi_read),
addr, reg, data, data_out);
return (u16)data_out;
}
@@ -1009,7 +1010,7 @@ static u16 mdio_ctrl_phy_mii_emulated(struct nic *nic,
default:
netif_printk(nic, hw, KERN_DEBUG, nic->netdev,
"%s:addr=%d, reg=%d, data=0x%04X: unimplemented emulation!\n",
- dir == mdi_read ? "READ" : "WRITE",
+ str_read_write(dir == mdi_read),
addr, reg, data);
return 0xFFFF;
}
@@ -1018,7 +1019,7 @@ static u16 mdio_ctrl_phy_mii_emulated(struct nic *nic,
default:
netif_printk(nic, hw, KERN_DEBUG, nic->netdev,
"%s:addr=%d, reg=%d, data=0x%04X: unimplemented emulation!\n",
- dir == mdi_read ? "READ" : "WRITE",
+ str_read_write(dir == mdi_read),
addr, reg, data);
return 0xFFFF;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] net: e100: Use str_read_write() helper
2025-05-15 12:44 [PATCH linux-next] net: e100: Use str_read_write() helper long.yunjian
@ 2025-05-15 13:35 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2025-05-15 13:35 UTC (permalink / raw)
To: long.yunjian
Cc: anthony.l.nguyen, przemyslaw.kitszel, andrew+netdev, davem,
edumazet, pabeni, intel-wired-lan, netdev, linux-kernel,
fang.yumeng, xu.lifeng1, ouyang.maochun, mou.yi
On Thu, 15 May 2025 20:44:14 +0800 (CST) long.yunjian@zte.com.cn wrote:
> From: Yumeng Fang <fang.yumeng@zte.com.cn>
>
> Remove hard-coded strings by using the str_read_write() helper.
Please don't send "string_choices" conversions to netdev.
This is pointless churn.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-15 13:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15 12:44 [PATCH linux-next] net: e100: Use str_read_write() helper long.yunjian
2025-05-15 13:35 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).