summaryrefslogtreecommitdiff
path: root/drivers/media/platform/mediatek
diff options
context:
space:
mode:
authorGuo Zhengkui <guozhengkui@vivo.com>2022-06-14 10:25:59 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-06-27 11:01:02 +0300
commit63249a5cab81b69d43b0a508eb597e7be6f5343a (patch)
tree87a545a31b704160583b0816b1b93d8ab0a366d0 /drivers/media/platform/mediatek
parent7d772a47cace0fd9a540e811af2578545078a825 (diff)
downloadlinux-63249a5cab81b69d43b0a508eb597e7be6f5343a.tar.xz
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: 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>
Diffstat (limited to 'drivers/media/platform/mediatek')
-rw-r--r--drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c b/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c
index f464af190d8c..81de876d5126 100644
--- a/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c
+++ b/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c
@@ -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