[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250523141647052h8sceSvH_KRJYFgqd6iuJ@zte.com.cn>
Date: Fri, 23 May 2025 14:16:47 +0800 (CST)
From: <long.yunjian@....com.cn>
To: <codrin.ciubotariu@...rochip.com>
Cc: <andi.shyti@...nel.org>, <nicolas.ferre@...rochip.com>,
<alexandre.belloni@...tlin.com>, <claudiu.beznea@...on.dev>,
<linux-i2c@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <mou.yi@....com.cn>,
<xu.lifeng1@....com.cn>, <fang.yumeng@....com.cn>,
<ouyang.maochun@....com.cn>
Subject: [PATCH] i2c: at91: Use str_read_write() helper
From: Yumeng Fang <fang.yumeng@....com.cn>
Remove hard-coded strings by using the str_read_write() helper.
Signed-off-by: Yumeng Fang <fang.yumeng@....com.cn>
Signed-off-by: Yunjian Long <long.yunjian@....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
Powered by blists - more mailing lists