linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/v3d: nullify pointer se with a NULL
@ 2021-10-15  7:14 Yang Li
  2021-10-15 13:46 ` Melissa Wen
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-10-15  7:14 UTC (permalink / raw)
  To: airlied; +Cc: daniel, emma, dri-devel, linux-kernel, Yang Li

Currently a plain integer is being used to nullify the pointer
struct v3d_submit_ext *se. Use NULL instead. Cleans up sparse
warnings:
drivers/gpu/drm/v3d/v3d_gem.c:777:53: warning: Using plain integer as
NULL pointer
drivers/gpu/drm/v3d/v3d_gem.c:1010:45: warning: Using plain integer as
NULL pointer

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.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 e47ae40..c7ed2e1 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -774,7 +774,7 @@ void v3d_job_put(struct v3d_job *job)
 
 	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 @@ void v3d_job_put(struct v3d_job *job)
 		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;
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] drm/v3d: nullify pointer se with a NULL
  2021-10-15  7:14 [PATCH -next] drm/v3d: nullify pointer se with a NULL Yang Li
@ 2021-10-15 13:46 ` Melissa Wen
  0 siblings, 0 replies; 2+ messages in thread
From: Melissa Wen @ 2021-10-15 13:46 UTC (permalink / raw)
  To: Yang Li; +Cc: airlied, daniel, emma, dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

On 10/15, Yang Li wrote:
> Currently a plain integer is being used to nullify the pointer
> struct v3d_submit_ext *se. Use NULL instead. Cleans up sparse
> warnings:
> drivers/gpu/drm/v3d/v3d_gem.c:777:53: warning: Using plain integer as
> NULL pointer
> drivers/gpu/drm/v3d/v3d_gem.c:1010:45: warning: Using plain integer as
> NULL pointer
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.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 e47ae40..c7ed2e1 100644
> --- a/drivers/gpu/drm/v3d/v3d_gem.c
> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
> @@ -774,7 +774,7 @@ void v3d_job_put(struct v3d_job *job)
>  
>  	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 @@ void v3d_job_put(struct v3d_job *job)
>  		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;

Thanks, 

Reviewed-by: Melissa Wen <mwen@igalia.com>

and I'll apply do drm-misc-next.
>  
> -- 
> 1.8.3.1
> 

[-- 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-10-15 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15  7:14 [PATCH -next] drm/v3d: nullify pointer se with a NULL Yang Li
2021-10-15 13:46 ` Melissa Wen

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).