提交 bf727263 编写于 作者: T Tony Cheng 提交者: Alex Deucher

drm/amd/display: assert if mask is 0 in set_reg_field_value_ex

-  mask = 0 means something is wrong in caller and no register field will be updated
Signed-off-by: NTony Cheng <tony.cheng@amd.com>
Reviewed-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 f84a8161
......@@ -165,6 +165,7 @@ static inline uint32_t set_reg_field_value_ex(
uint32_t mask,
uint8_t shift)
{
ASSERT(mask != 0);
return (reg_value & ~mask) | (mask & (value << shift));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册