Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Guo Zhengkui and committed by
Tomi Valkeinen
e8523f53 e73f57b7

+1 -1
+1 -1
drivers/gpu/drm/omapdrm/dss/dispc.c
··· 2451 2451 2452 2452 *decim_x = DIV_ROUND_UP(width, in_width_max); 2453 2453 2454 - *decim_x = *decim_x > decim_x_min ? *decim_x : decim_x_min; 2454 + *decim_x = max(*decim_x, decim_x_min); 2455 2455 if (*decim_x > *x_predecim) 2456 2456 return -EINVAL; 2457 2457