]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: renesas: Use str_on_off() helper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 28 Apr 2025 11:45:55 +0000 (13:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:41 +0000 (13:54 +0100)
[ Upstream commit aff664cc8cbc5c28e5aa57dc4201c34497f3c871 ]

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
Stable-dep-of: b91401af6c00 ("clk: renesas: cpg-mssr: Read back reset registers to assure values latched")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/renesas/renesas-cpg-mssr.c
drivers/clk/renesas/rzg2l-cpg.c

index ecb7e2024d5891c3149b4329be4c8981acc9b1a3..22699a47e675c70af767e212ff49ddd8462ec029 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>
 
@@ -205,7 +206,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 e2ecc9d36e0512b5b806396dddadf759bd79bef5..e4f2d974f38a1f4ed3119285186ef510a024c50c 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>
@@ -1222,7 +1223,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)