* [PATCH] drm/v3d: pass null pointers using NULL
@ 2021-11-10 19:36 Colin Ian King
2021-11-11 18:09 ` Melissa Wen
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2021-11-10 19:36 UTC (permalink / raw)
To: Emma Anholt, David Airlie, Daniel Vetter, Melissa Wen,
Iago Toral Quiroga, dri-devel
Cc: kernel-janitors, linux-kernel
There are a couple of calls that are passing null pointers as
integer zeros rather than NULL. Fix this by using NULL instead.
Fixes: 07c2a41658c4 ("drm/v3d: alloc and init job in one shot")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/gpu/drm/v3d/v3d_gem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index e47ae40a865a..c7ed2e1cbab6 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -774,7 +774,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
if (args->flags & DRM_V3D_SUBMIT_CL_FLUSH_CACHE) {
ret = v3d_job_init(v3d, file_priv, (void *)&clean_job, sizeof(*clean_job),
- v3d_job_free, 0, 0, V3D_CACHE_CLEAN);
+ v3d_job_free, 0, NULL, V3D_CACHE_CLEAN);
if (ret)
goto fail;
@@ -1007,7 +1007,7 @@ v3d_submit_csd_ioctl(struct drm_device *dev, void *data,
goto fail;
ret = v3d_job_init(v3d, file_priv, (void *)&clean_job, sizeof(*clean_job),
- v3d_job_free, 0, 0, V3D_CACHE_CLEAN);
+ v3d_job_free, 0, NULL, V3D_CACHE_CLEAN);
if (ret)
goto fail;
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/v3d: pass null pointers using NULL
2021-11-10 19:36 [PATCH] drm/v3d: pass null pointers using NULL Colin Ian King
@ 2021-11-11 18:09 ` Melissa Wen
0 siblings, 0 replies; 2+ messages in thread
From: Melissa Wen @ 2021-11-11 18:09 UTC (permalink / raw)
To: Colin Ian King
Cc: Emma Anholt, David Airlie, Daniel Vetter, Iago Toral Quiroga,
dri-devel, kernel-janitors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]
On 11/10, Colin Ian King wrote:
> There are a couple of calls that are passing null pointers as
> integer zeros rather than NULL. Fix this by using NULL instead.
>
> Fixes: 07c2a41658c4 ("drm/v3d: alloc and init job in one shot")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/gpu/drm/v3d/v3d_gem.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
> index e47ae40a865a..c7ed2e1cbab6 100644
> --- a/drivers/gpu/drm/v3d/v3d_gem.c
> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
> @@ -774,7 +774,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
>
> if (args->flags & DRM_V3D_SUBMIT_CL_FLUSH_CACHE) {
> ret = v3d_job_init(v3d, file_priv, (void *)&clean_job, sizeof(*clean_job),
> - v3d_job_free, 0, 0, V3D_CACHE_CLEAN);
> + v3d_job_free, 0, NULL, V3D_CACHE_CLEAN);
> if (ret)
> goto fail;
>
> @@ -1007,7 +1007,7 @@ v3d_submit_csd_ioctl(struct drm_device *dev, void *data,
> goto fail;
>
> ret = v3d_job_init(v3d, file_priv, (void *)&clean_job, sizeof(*clean_job),
> - v3d_job_free, 0, 0, V3D_CACHE_CLEAN);
> + v3d_job_free, 0, NULL, V3D_CACHE_CLEAN);
> if (ret)
> goto fail;
Hi Colin,
This fix has been already done:
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=75ad021f21927311b8d454939eb248a50df92525
Thanks, anyway.
Melissa
>
> --
> 2.32.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-11 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-10 19:36 [PATCH] drm/v3d: pass null pointers using NULL Colin Ian King
2021-11-11 18:09 ` Melissa Wen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox