]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: sp7021: switch to FIELD_PREP_WM16 macro
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>
Mon, 25 Aug 2025 08:28:39 +0000 (10:28 +0200)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Mon, 22 Sep 2025 19:52:11 +0000 (15:52 -0400)
commitb8b567718844da9cf37a843706e60e71b8071645
tree83064eb61b31de7c6243e509ac227bdfd3f98e3c
parent30e919570581235907d330f5308e498c12ccb10f
clk: sp7021: switch to FIELD_PREP_WM16 macro

The sp7021 clock driver has its own shifted high word mask macro,
similar to the ones many Rockchip drivers have.

Remove it, and replace instances of it with hw_bitfield.h's
FIELD_PREP_WM16 macro, which does the same thing except in a common
macro that also does compile-time error checking.

This was compile-tested with 32-bit ARM with Clang, no runtime tests
were performed as I lack the hardware. However, I verified that fix
commit 5c667d5a5a3e ("clk: sp7021: Adjust width of _m in HWM_FIELD_PREP()")
is not regressed. No warning is produced.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/clk/clk-sp7021.c