drivers/i2c/busses/i2c-at91-master.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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>
Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn>
---
drivers/i2c/busses/i2c-at91-master.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c
index ee3b469ddfb9..374fc50bb205 100644
--- a/drivers/i2c/busses/i2c-at91-master.c
+++ b/drivers/i2c/busses/i2c-at91-master.c
@@ -26,6 +26,7 @@
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/string_choices.h>
#include "i2c-at91.h"
@@ -523,7 +524,7 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev)
*/
dev_dbg(dev->dev, "transfer: %s %zu bytes.\n",
- (dev->msg->flags & I2C_M_RD) ? "read" : "write", dev->buf_len);
+ str_read_write(dev->msg->flags & I2C_M_RD), dev->buf_len);
reinit_completion(&dev->cmd_complete);
dev->transfer_status = 0;
--
2.25.1
On Fri, May 23, 2025 at 02:16:47PM +0800, 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. > > Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn> > Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn> Thank you, but please fix this for the whole subsystem in a single patch.
>> Remove hard-coded strings by using the str_read_write() helper. >> >> Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn> >> Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn> > >Thank you, but please fix this for the whole subsystem in a single >patch. Thank you, I have fixed this issue in the whole i2c subsystem. I will send the PATCH V2 and look forward to your further review. Best regards, Fang Yumeng Original From: wsa+renesas <wsa+renesas@sang-engineering.com> To: Long Yunjian10171699; Cc: codrin.ciubotariu <codrin.ciubotariu@microchip.com>;andi.shyti <andi.shyti@kernel.org>;nicolas.ferre <nicolas.ferre@microchip.com>;alexandre.belloni <alexandre.belloni@bootlin.com>;claudiu.beznea <claudiu.beznea@tuxon.dev>;linux-i2c <linux-i2c@vger.kernel.org>;linux-arm-kernel <linux-arm-kernel@lists.infradead.org>;linux-kernel <linux-kernel@vger.kernel.org>;Mou Yi10205508;Xu Lifeng10013465;Fang Yumeng00336438;Ouyang Maochun10090504; Date: 2025/05/23 14:51 Subject: Re: [PATCH] i2c: at91: Use str_read_write() helper On Fri, May 23, 2025 at 02:16:47PM +0800, 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. > > Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn> > Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn> Thank you, but please fix this for the whole subsystem in a single patch.
© 2016 - 2025 Red Hat, Inc.