clk: sophgo: Fix a warning about void returns value
authorTom Rini <trini@konsulko.com>
Wed, 1 Oct 2025 20:30:57 +0000 (14:30 -0600)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 16 Oct 2025 08:44:49 +0000 (16:44 +0800)
The cv1800b_clk_setfield function returns void, but was doing "return
writel(...);" and while seemingly having a void function return a void
function is not a warning, when readl is a macro this problem is shown.
Correct the code to instead simply call writel.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Yao Zi <ziyao@disroot.org>
drivers/clk/sophgo/clk-common.h

index a9e83d0..a18673f 100644 (file)
@@ -70,7 +70,7 @@ cv1800b_clk_setfield(void *base, struct cv1800b_clk_regfield *field, u32 val)
        u32 new_val = (readl(base + field->offset) & ~mask) |
                      ((val << field->shift) & mask);
 
-       return writel(new_val, base + field->offset);
+       writel(new_val, base + field->offset);
 }
 
 #endif /* __CLK_SOPHGO_COMMON_H__ */