From: Wambui Karuga Date: Thu, 9 Jan 2020 14:20:57 +0000 (+0300) Subject: drm/rockchip: use DIV_ROUND_UP macro for calculations. X-Git-Tag: v5.10.7~2352^2~6^2~462 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53c902b9998aab63c048af5798cbfd33b938cbdd;p=platform%2Fkernel%2Flinux-rpi.git drm/rockchip: use DIV_ROUND_UP macro for calculations. Replace the open coded calculation with the more concise and readable DIV_ROUND_UP macro. Signed-off-by: Wambui Karuga Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20200109142057.10744-1-wambui.karugax@gmail.com --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h index 0b3d18c..cc67262 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h @@ -328,7 +328,7 @@ static inline uint16_t scl_get_bili_dn_vskip(int src_h, int dst_h, { int act_height; - act_height = (src_h + vskiplines - 1) / vskiplines; + act_height = DIV_ROUND_UP(src_h, vskiplines); if (act_height == dst_h) return GET_SCL_FT_BILI_DN(src_h, dst_h) / vskiplines;