* [PATCH] drm/mediatek: stop using 0 as NULL pointer
@ 2023-01-10 3:12 Miles Chen
2023-01-10 9:36 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 3+ messages in thread
From: Miles Chen @ 2023-01-10 3:12 UTC (permalink / raw)
To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Daniel Vetter,
Matthias Brugger
Cc: linux-kernel, Miles Chen, dri-devel, linux-mediatek,
linux-arm-kernel
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
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
---
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/mediatek: stop using 0 as NULL pointer
2023-01-10 3:12 [PATCH] drm/mediatek: stop using 0 as NULL pointer Miles Chen
@ 2023-01-10 9:36 ` AngeloGioacchino Del Regno
2023-01-11 2:42 ` Miles Chen
0 siblings, 1 reply; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-01-10 9:36 UTC (permalink / raw)
To: Miles Chen, Chun-Kuang Hu, Philipp Zabel, David Airlie,
Daniel Vetter, Matthias Brugger
Cc: linux-kernel, dri-devel, linux-mediatek, linux-arm-kernel
Il 10/01/23 04:12, Miles Chen ha scritto:
> 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
>
> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Please add the appropriate tag...
Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function")
after which:
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/mediatek: stop using 0 as NULL pointer
2023-01-10 9:36 ` AngeloGioacchino Del Regno
@ 2023-01-11 2:42 ` Miles Chen
0 siblings, 0 replies; 3+ messages in thread
From: Miles Chen @ 2023-01-11 2:42 UTC (permalink / raw)
To: angelogioacchino.delregno
Cc: airlied, chunkuang.hu, daniel, dri-devel, linux-arm-kernel,
linux-kernel, linux-mediatek, matthias.bgg, miles.chen, p.zabel
Hi Angelo,
>Il 10/01/23 04:12, Miles Chen ha scritto:
>> 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
>>
>> Signed-off-by: Miles Chen <miles.chen@mediatek.com>
>
>Please add the appropriate tag...
>
>Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function")
No problem, I will add the Fixes tag and submit v2.
thanks,
Miles
>
>after which:
>
>Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-11 3:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-10 3:12 [PATCH] drm/mediatek: stop using 0 as NULL pointer Miles Chen
2023-01-10 9:36 ` AngeloGioacchino Del Regno
2023-01-11 2:42 ` Miles Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).