[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6e9b0113a30c2dc8fc796deff276d71d3ad224d7.camel@mediatek.com>
Date: Mon, 17 Jun 2024 01:19:39 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
Shawn Sung (宋孝謙) <Shawn.Sung@...iatek.com>,
Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
"daniel@...ll.ch" <daniel@...ll.ch>, "p.zabel@...gutronix.de"
<p.zabel@...gutronix.de>, "dri-devel@...ts.freedesktop.org"
<dri-devel@...ts.freedesktop.org>, "airlied@...il.com" <airlied@...il.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
<matthias.bgg@...il.com>, "angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>
Subject: Re: [PATCH] drm/mediatek: Remove less-than-zero comparison of an
unsigned value
Hi, Shawn:
On Fri, 2024-06-14 at 11:49 +0800, Shawn Sung wrote:
> From: Hsiao Chien Sung <shawn.sung@...iatek.com>
>
> Fix a Coverity error that less-than-zero comparison of an unsigned value
> is never true.
Reviewed-by: CK Hu <ck.hu@...iatek.com>
>
> Fixes: 0d9eee9118b7 ("drm/mediatek: Add drm ovl_adaptor sub driver for MT8195")
> Signed-off-by: Hsiao Chien Sung <shawn.sung@...iatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_ddp_comp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
> index 17b036411292..a66e46d0b45e 100644
> --- a/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_ddp_comp.c
> @@ -593,7 +593,7 @@ int mtk_ddp_comp_init(struct device_node *node, struct mtk_ddp_comp *comp,
> int ret;
> #endif
>
> - if (comp_id < 0 || comp_id >= DDP_COMPONENT_DRM_ID_MAX)
> + if (comp_id >= DDP_COMPONENT_DRM_ID_MAX)
> return -EINVAL;
>
> type = mtk_ddp_matches[comp_id].type;
Powered by blists - more mailing lists