Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Thorsten Blum and committed by
Madhavan Srinivasan
6dc5d077 e7a6475c

+2 -1
+2 -1
drivers/ps3/ps3stor_lib.c
··· 8 8 9 9 #include <linux/dma-mapping.h> 10 10 #include <linux/module.h> 11 + #include <linux/string_choices.h> 11 12 12 13 #include <asm/lv1call.h> 13 14 #include <asm/ps3stor.h> ··· 266 265 u64 start_sector, u64 sectors, int write) 267 266 { 268 267 unsigned int region_id = dev->regions[dev->region_idx].id; 269 - const char *op = write ? "write" : "read"; 268 + const char *op = str_write_read(write); 270 269 int res; 271 270 272 271 dev_dbg(&dev->sbd.core, "%s:%u: %s %llu sectors starting at %llu\n",