From: Thorsten Blum Date: Tue, 19 Aug 2025 16:58:29 +0000 (+0200) Subject: powerpc/ps3: Use str_write_read() in ps3stor_read_write_sectors() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6dc5d0770dc99d6bf9b786fa3c8fc04be2091648;p=users%2Fhch%2Fmisc.git 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 Reviewed-by: Geert Uytterhoeven Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250819165829.714344-2-thorsten.blum@linux.dev --- diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c index a12a1ad9b5fe..3d4d343ee0c8 100644 --- a/drivers/ps3/ps3stor_lib.c +++ b/drivers/ps3/ps3stor_lib.c @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -265,7 +266,7 @@ u64 ps3stor_read_write_sectors(struct ps3_storage_device *dev, u64 lpar, u64 start_sector, u64 sectors, int write) { unsigned int region_id = dev->regions[dev->region_idx].id; - const char *op = write ? "write" : "read"; + const char *op = str_write_read(write); int res; dev_dbg(&dev->sbd.core, "%s:%u: %s %llu sectors starting at %llu\n",