Message ID | 20250523141647052h8sceSvH_KRJYFgqd6iuJ@zte.com.cn |
---|---|
State | New |
Headers | show |
Series | i2c: at91: Use str_read_write() helper | expand |
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.
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;