mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] block: ps3disk: Use str_read_write() helper
@ 2025-04-01 11:21 shao.mingyin
  2025-04-01 13:18 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: shao.mingyin @ 2025-04-01 11:21 UTC (permalink / raw)
  To: geoff
  Cc: axboe, maddy, mpe, npiggin, christophe.leroy, naveen,
	linuxppc-dev, linux-block, linux-kernel, yang.yang29, xu.xin16,
	ye.xingchen, feng.wei8

From: Feng Wei <feng.wei8@zte.com.cn>

Remove hard-coded strings by using the str_read_write() helper.

Signed-off-by: Feng Wei <feng.wei8@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
 drivers/block/ps3disk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index dc9e4a14b885..b7fe90b6fdef 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -9,6 +9,7 @@
 #include <linux/ata.h>
 #include <linux/blk-mq.h>
 #include <linux/slab.h>
+#include <linux/string_choices.h>
 #include <linux/module.h>

 #include <asm/lv1call.h>
@@ -233,7 +234,7 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data)
 		op = "flush";
 	} else {
 		read = !rq_data_dir(req);
-		op = read ? "read" : "write";
+		op = str_read_write(read);
 	}
 	if (status) {
 		dev_dbg(&dev->sbd.core, "%s:%u: %s failed 0x%llx\n", __func__,
-- 
2.25.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-01 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-01 11:21 [PATCH] block: ps3disk: Use str_read_write() helper shao.mingyin
2025-04-01 13:18 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®