[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9fef91917df081bd94e4b8e7e76b441264ad073c.camel@ndufresne.ca>
Date: Tue, 14 Jun 2022 14:16:01 -0400
From: Nicolas Dufresne <nicolas@...fresne.ca>
To: Guo Zhengkui <guozhengkui@...o.com>,
Tiffany Lin <tiffany.lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Yunfei Dong <yunfei.dong@...iatek.com>,
Haowen Bai <baihaowen@...zu.com>,
George Sun <george.sun@...iatek.com>,
"open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)"
<linux-media@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>
Cc: zhengkui_guo@...look.com
Subject: Re: [PATCH] media: mediatek: vcodec: fix minmax.cocci warning
Le mardi 14 juin 2022 à 15:25 +0800, Guo Zhengkui a écrit :
> 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@...o.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> ---
> .../media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
regards,
Nicolas
Powered by blists - more mailing lists