]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: rockchip-samsung-dcphy: switch to FIELD_PREP_WM16 macro
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>
Mon, 25 Aug 2025 08:28:29 +0000 (10:28 +0200)
committerYury Norov <yury.norov@gmail.com>
Wed, 3 Sep 2025 00:06:47 +0000 (20:06 -0400)
commitd6de45fd7f1c8ef9f03fd16a97959e42271c3f78
treeb1264a4c8cce55b77c39032381a118904c745e9e
parent9040ecd0bf9ba0045736525027e30bdf56705b01
phy: rockchip-samsung-dcphy: switch to FIELD_PREP_WM16 macro

The era of hand-rolled HIWORD_UPDATE macros is over, at least for those
drivers that use constant masks.

phy-rockchip-samsung-dcphy is actually an exemplary example, where the
similarities to FIELD_PREP were spotted and the driver local macro has
the same semantics as the new FIELD_PREP_WM16 hw_bitfield.h macro.

Still, get rid of FIELD_PREP_HIWORD now that a shared implementation
exists, replacing the two instances of it with FIELD_PREP_WM16. This
gives us slightly better error checking; the value is now checked to fit
in 16 bits.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c