Skip to contentSkip to conversation

powerpc/ps3: Use str_write_read() in ps3_notification_read_write()

PATCH RESEND Superseded Thorsten Blum 2 participants 2 messages Feb 19, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 powerpc/ps3: Use str_write_read() in ps3_notification_read_write()

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

---
 arch/powerpc/platforms/ps3/device-init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/ps3/device-init.c +2 -1
index 61722133eb2d..22d91ac424dd 100644
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/reboot.h>
 #include <linux/rcuwait.h>
+#include <linux/string_choices.h>
 
 #include <asm/firmware.h>
 #include <asm/lv1call.h>
@@ -724,7 +725,7 @@ static irqreturn_t ps3_notification_interrupt(int irq, void *data)
 static int ps3_notification_read_write(struct ps3_notification_device *dev,
 				       u64 lpar, int write)
 {
-	const char *op = write ? "write" : "read";
+	const char *op = str_write_read(write);
 	unsigned long flags;
 	int res;
 
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Thorsten Blum

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

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds