Skip to content

Commit 6dc5d07

Browse files
tobluxmaddy-kerneldev
authored andcommitted
powerpc/ps3: Use str_write_read() in ps3stor_read_write_sectors()
Remove hard-coded strings by using the str_write_read() helper function and silence the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_write_read(write) Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20250819165829.714344-2-thorsten.blum@linux.dev
1 parent e7a6475 commit 6dc5d07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/ps3/ps3stor_lib.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <linux/dma-mapping.h>
1010
#include <linux/module.h>
11+
#include <linux/string_choices.h>
1112

1213
#include <asm/lv1call.h>
1314
#include <asm/ps3stor.h>
@@ -265,7 +266,7 @@ u64 ps3stor_read_write_sectors(struct ps3_storage_device *dev, u64 lpar,
265266
u64 start_sector, u64 sectors, int write)
266267
{
267268
unsigned int region_id = dev->regions[dev->region_idx].id;
268-
const char *op = write ? "write" : "read";
269+
const char *op = str_write_read(write);
269270
int res;
270271

271272
dev_dbg(&dev->sbd.core, "%s:%u: %s %llu sectors starting at %llu\n",

0 commit comments

Comments
 (0)