[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAOTY_9SzkF7j5Zj5WpQRbcHeR3FO8Z7sYdm5-8FSZqQNAjfoQ@mail.gmail.com>
Date: Fri, 27 Jan 2023 08:44:57 +0800
From: Chun-Kuang Hu <chunkuang.hu@...nel.org>
To: Miles Chen <miles.chen@...iatek.com>
Cc: Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Matthias Brugger <matthias.bgg@...il.com>,
CK Hu <ck.hu@...iatek.com>, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2] drm/mediatek: stop using 0 as NULL pointer
Hi, Miles:
Miles Chen <miles.chen@...iatek.com> 於 2023年1月11日 週三 上午10:52寫道:
>
> Use NULL for NULL pointer to fix the following sparse warning:
> drivers/gpu/drm/mediatek/mtk_drm_gem.c:265:27: sparse: warning: Using plain integer as NULL pointer
Applied to mediatek-drm-next [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next
Regards,
Chun-Kuang.
>
> Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function")
> Signed-off-by: Miles Chen <miles.chen@...iatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
>
> ---
>
> Change since v1:
> Add Fixes tag
>
> ---
> drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> index 47e96b0289f9..06aadd5e7f5b 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> @@ -262,6 +262,6 @@ void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj,
> return;
>
> vunmap(vaddr);
> - mtk_gem->kvaddr = 0;
> + mtk_gem->kvaddr = NULL;
> kfree(mtk_gem->pages);
> }
> --
> 2.18.0
>
Powered by blists - more mailing lists