* [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; 2+ 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] 2+ 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
0 siblings, 0 replies; 2+ 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] 2+ messages in thread
end of thread, other threads:[~2025-05-23 8:08 UTC | newest]
Thread overview: 2+ 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox