Fix the following coccicheck warning:
drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c:
694:15-16: WARNING opportunity for min().
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
int sbs = (mi_num + 7) >> 3;
int offset = ((idx * sbs) >> tile_log2) << 3;
- return offset < mi_num ? offset : mi_num;
+ return min(offset, mi_num);
}
static