]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: synopsys: hdmirx: replace macros with bitfield variants
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>
Mon, 25 Aug 2025 08:28:24 +0000 (10:28 +0200)
committerYury Norov <yury.norov@gmail.com>
Wed, 3 Sep 2025 00:05:57 +0000 (20:05 -0400)
commit7d5f75a9d413de35c376597ead4174081373644b
tree234af0317702ea480fe74fd3525f49ab5654f1b5
parent90fbf6a21ec433b329c207f5ff542a20081b7fa5
media: synopsys: hdmirx: replace macros with bitfield variants

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

Replace the UPDATE macro with bitfield.h's FIELD_PREP, to give us
additional error checking.

Also, replace the HIWORD_UPDATE macro at the same time with the new
FIELD_PREP_WM16 macro in hw_bitfield.h, which also gives us additional
error checking.

The UPDATE/HIWORD_UPDATE macros are left as wrappers around the
replacement macros, in order to not rock the boat too much, and keep the
changes easy to review.

Yury: drop extra parens around FIELD_PREPs (Dmitry)

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.h