Thread (2 messages) 2 messages, 2 authors, 2025-04-01
STALE470d

[PATCH] block: ps3disk: Use str_read_write() helper

From: <hidden>
Date: 2025-04-01 11:21:58
Also in: linux-block, lkml
Subsystem: block layer, ps3 platform support, the rest · Maintainers: Jens Axboe, Geoff Levand, Linus Torvalds

From: Feng Wei <redacted>

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

Signed-off-by: Feng Wei <redacted>
Signed-off-by: Shao Mingyin <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help