phy: mediatek: fix build warning of FIELD_PREP()
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Wed, 28 Sep 2022 07:07:46 +0000 (15:07 +0800)
committerVinod Koul <vkoul@kernel.org>
Thu, 29 Sep 2022 05:42:31 +0000 (11:12 +0530)
commit84513eccd67804c02a0c42017bc7eaa4ad112478
tree7667f7842cd0b64b9b6009aca1998adc4377d55e
parentadd7000bdd438c4195095dca7bff6877d54d06f4
phy: mediatek: fix build warning of FIELD_PREP()

Change the inline function mtk_phy_update_field() into a macro to
avoid check warning of FIELD_PREP() with compiler parameter
-Wtautological-constant-out-of-range-compare

the warning is caused by mask check:
"BUILD_BUG_ON_MSG(__bf_cast_unsigned(_mask, _mask) >     \"

Fixes: 29c07477556e ("phy: mediatek: add a new helper to update bitfield")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220928070746.5393-1-chunfeng.yun@mediatek.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/mediatek/phy-mtk-io.h