clk: renesas: Use str_on_off() helper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 28 Apr 2025 11:45:55 +0000 (13:45 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 5 May 2025 08:48:07 +0000 (10:48 +0200)
Use the str_on_off() helper instead of open-coding the same operation.
Note that this does change the case of the flags, which doesn't matter
much for debug messages.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/622f8554dcb815c8fc73511a1a118c1724570fa9.1745840497.git.geert+renesas@glider.be
drivers/clk/renesas/renesas-cpg-mssr.c
drivers/clk/renesas/rzg2l-cpg.c

index da021ee446ec8120ce67a768c800e4579dce5962..71431970d6e6a10ba0897f0bc0e3a8717ccab5c0 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/psci.h>
 #include <linux/reset-controller.h>
 #include <linux/slab.h>
+#include <linux/string_choices.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
 
@@ -204,7 +205,7 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
        int error;
 
        dev_dbg(dev, "MSTP %u%02u/%pC %s\n", reg, bit, hw->clk,
-               enable ? "ON" : "OFF");
+               str_on_off(enable));
        spin_lock_irqsave(&priv->rmw_lock, flags);
 
        if (priv->reg_layout == CLK_REG_LAYOUT_RZ_A) {
index b91dfbfb01e31cd8833cdcd3ef64d07526e3b3de..a8628f64a03bd7e0cff295c25e80b07b9c755739 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/pm_domain.h>
 #include <linux/reset-controller.h>
 #include <linux/slab.h>
+#include <linux/string_choices.h>
 #include <linux/units.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
@@ -1217,7 +1218,7 @@ static int rzg2l_mod_clock_endisable(struct clk_hw *hw, bool enable)
        }
 
        dev_dbg(dev, "CLK_ON 0x%x/%pC %s\n", CLK_ON_R(reg), hw->clk,
-               enable ? "ON" : "OFF");
+               str_on_off(enable));
 
        value = bitmask << 16;
        if (enable)