diff options
| author | 2022-06-14 08:25:59 +0100 | |
|---|---|---|
| committer | 2022-06-27 09:01:02 +0100 | |
| commit | 63249a5cab81b69d43b0a508eb597e7be6f5343a (patch) | |
| tree | 87a545a31b704160583b0816b1b93d8ab0a366d0 | |
| parent | media: MAINTAINERS: add include/dt-bindings/media to MEDIA INPUT INFRASTRUCTURE (diff) | |
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>
| -rw-r--r-- | drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 2 |
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 |
