mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
drm: omapdrm: dss: replace ternary operator with max()
Fix the following coccicheck warning: drivers/gpu/drm/omapdrm/dss/dispc.c:2454:21-22: WARNING opportunity for max() Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220517050208.121488-1-guozhengkui@vivo.com
This commit is contained in:
parent
e73f57b70a
commit
e8523f53bf
@ -2451,7 +2451,7 @@ static int dispc_ovl_calc_scaling_44xx(struct dispc_device *dispc,
|
||||
|
||||
*decim_x = DIV_ROUND_UP(width, in_width_max);
|
||||
|
||||
*decim_x = *decim_x > decim_x_min ? *decim_x : decim_x_min;
|
||||
*decim_x = max(*decim_x, decim_x_min);
|
||||
if (*decim_x > *x_predecim)
|
||||
return -EINVAL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user