* [PATCH] i2c: at91: Use str_read_write() helper
@ 2025-05-23 6:16 long.yunjian
2025-05-23 6:51 ` Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: long.yunjian @ 2025-05-23 6:16 UTC (permalink / raw)
To: codrin.ciubotariu
Cc: andi.shyti, nicolas.ferre, alexandre.belloni, claudiu.beznea,
linux-i2c, linux-arm-kernel, linux-kernel, mou.yi, xu.lifeng1,
fang.yumeng, ouyang.maochun
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: at91: Use str_read_write() helper
2025-05-23 6:16 [PATCH] i2c: at91: Use str_read_write() helper long.yunjian
@ 2025-05-23 6:51 ` Wolfram Sang
2025-05-23 8:23 ` long.yunjian
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2025-05-23 6:51 UTC (permalink / raw)
To: long.yunjian
Cc: codrin.ciubotariu, andi.shyti, nicolas.ferre, alexandre.belloni,
claudiu.beznea, linux-i2c, linux-arm-kernel, linux-kernel, mou.yi,
xu.lifeng1, fang.yumeng, ouyang.maochun
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: at91: Use str_read_write() helper
2025-05-23 6:51 ` Wolfram Sang
@ 2025-05-23 8:23 ` long.yunjian
0 siblings, 0 replies; 3+ messages in thread
From: long.yunjian @ 2025-05-23 8:23 UTC (permalink / raw)
To: wsa+renesas
Cc: codrin.ciubotariu, andi.shyti, nicolas.ferre, alexandre.belloni,
claudiu.beznea, linux-i2c, linux-arm-kernel, linux-kernel, mou.yi,
xu.lifeng1, fang.yumeng, ouyang.maochun
[-- Attachment #1.1.1: Type: text/plain, Size: 1447 bytes --]
>> 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.
[-- Attachment #1.1.2: Type: text/html , Size: 3380 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-23 8:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 6:16 [PATCH] i2c: at91: Use str_read_write() helper long.yunjian
2025-05-23 6:51 ` Wolfram Sang
2025-05-23 8:23 ` long.yunjian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox