Commit 63249a5c authored by Guo Zhengkui's avatar Guo Zhengkui Committed by Mauro Carvalho Chehab

media: mediatek: vcodec: fix minmax.cocci warning

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: default avatarGuo Zhengkui <guozhengkui@vivo.com>
Reviewed-by: default avatarNicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 7d772a47
......@@ -691,7 +691,7 @@ static int vdec_vp9_slice_tile_offset(int idx, int mi_num, int tile_log2)
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment