The FLD_VAL function in the dispc driver hand-rolls what the FIELD_PREP macro provides. Let's switch to the latter.
Signed-off-by: Maxime Ripard <[email protected]> --- drivers/gpu/drm/tidss/tidss_dispc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index 5a0904acbed279506df2edad559dfe06f25cd7b5..7e36f5af666342dc4f5fa9159d829d88362de18c 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -609,11 +609,11 @@ void tidss_disable_oldi(struct tidss_device *tidss, u32 hw_videoport) * number. For example 7:0 */ static u32 FLD_VAL(u32 val, u32 start, u32 end) { - return (val << end) & GENMASK(start, end); + return FIELD_PREP(GENMASK(start, end), val); } static u32 FLD_GET(u32 val, u32 start, u32 end) { return (val & GENMASK(start, end)) >> end; -- 2.50.1
