kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
@ 2025-08-07 15:53 Dan Carpenter
  2025-08-07 17:02 ` Matthew Brost
  2025-09-15 11:12 ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-08-07 15:53 UTC (permalink / raw)
  To: Matthew Brost
  Cc: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
	David Airlie, Simona Vetter, intel-xe, dri-devel, linux-kernel,
	kernel-janitors

The xe_preempt_fence_create() function returns error pointers.  It
never returns NULL.  Update the error checking to match.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/xe/xe_vm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 432ea325677d..5c58c6d99dce 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -240,8 +240,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
 
 	pfence = xe_preempt_fence_create(q, q->lr.context,
 					 ++q->lr.seqno);
-	if (!pfence) {
-		err = -ENOMEM;
+	if (IS_ERR(pfence)) {
+		err = PTR_ERR(pfence);
 		goto out_fini;
 	}
 
-- 
2.47.2


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

* Re: [PATCH] drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
  2025-08-07 15:53 [PATCH] drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue() Dan Carpenter
@ 2025-08-07 17:02 ` Matthew Brost
  2025-09-15 11:12 ` Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: Matthew Brost @ 2025-08-07 17:02 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
	David Airlie, Simona Vetter, intel-xe, dri-devel, linux-kernel,
	kernel-janitors

On Thu, Aug 07, 2025 at 06:53:41PM +0300, Dan Carpenter wrote:
> The xe_preempt_fence_create() function returns error pointers.  It
> never returns NULL.  Update the error checking to match.
> 
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_vm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 432ea325677d..5c58c6d99dce 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -240,8 +240,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
>  
>  	pfence = xe_preempt_fence_create(q, q->lr.context,
>  					 ++q->lr.seqno);
> -	if (!pfence) {
> -		err = -ENOMEM;
> +	if (IS_ERR(pfence)) {
> +		err = PTR_ERR(pfence);
>  		goto out_fini;
>  	}
>  
> -- 
> 2.47.2
> 

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

* Re: [PATCH] drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
  2025-08-07 15:53 [PATCH] drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue() Dan Carpenter
  2025-08-07 17:02 ` Matthew Brost
@ 2025-09-15 11:12 ` Dan Carpenter
  2025-09-15 12:34   ` Rodrigo Vivi
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2025-09-15 11:12 UTC (permalink / raw)
  To: Matthew Brost
  Cc: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
	David Airlie, Simona Vetter, intel-xe, dri-devel, linux-kernel,
	kernel-janitors

Ping?

regards,
dan carpenter

On Thu, Aug 07, 2025 at 06:53:41PM +0300, Dan Carpenter wrote:
> The xe_preempt_fence_create() function returns error pointers.  It
> never returns NULL.  Update the error checking to match.
> 
> Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/gpu/drm/xe/xe_vm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 432ea325677d..5c58c6d99dce 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -240,8 +240,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
>  
>  	pfence = xe_preempt_fence_create(q, q->lr.context,
>  					 ++q->lr.seqno);
> -	if (!pfence) {
> -		err = -ENOMEM;
> +	if (IS_ERR(pfence)) {
> +		err = PTR_ERR(pfence);
>  		goto out_fini;
>  	}
>  
> -- 
> 2.47.2

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

* Re: [PATCH] drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue()
  2025-09-15 11:12 ` Dan Carpenter
@ 2025-09-15 12:34   ` Rodrigo Vivi
  0 siblings, 0 replies; 4+ messages in thread
From: Rodrigo Vivi @ 2025-09-15 12:34 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Matthew Brost, Lucas De Marchi, Thomas Hellström,
	David Airlie, Simona Vetter, intel-xe, dri-devel, linux-kernel,
	kernel-janitors

On Mon, Sep 15, 2025 at 02:12:00PM +0300, Dan Carpenter wrote:
> Ping?

Sorry for the delay and thank you for the patch.
pushed to drm-xe-next

> 
> regards,
> dan carpenter
> 
> On Thu, Aug 07, 2025 at 06:53:41PM +0300, Dan Carpenter wrote:
> > The xe_preempt_fence_create() function returns error pointers.  It
> > never returns NULL.  Update the error checking to match.
> > 
> > Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> > ---
> >  drivers/gpu/drm/xe/xe_vm.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> > index 432ea325677d..5c58c6d99dce 100644
> > --- a/drivers/gpu/drm/xe/xe_vm.c
> > +++ b/drivers/gpu/drm/xe/xe_vm.c
> > @@ -240,8 +240,8 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
> >  
> >  	pfence = xe_preempt_fence_create(q, q->lr.context,
> >  					 ++q->lr.seqno);
> > -	if (!pfence) {
> > -		err = -ENOMEM;
> > +	if (IS_ERR(pfence)) {
> > +		err = PTR_ERR(pfence);
> >  		goto out_fini;
> >  	}
> >  
> > -- 
> > 2.47.2

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

end of thread, other threads:[~2025-09-15 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07 15:53 [PATCH] drm/xe: Fix a NULL vs IS_ERR() in xe_vm_add_compute_exec_queue() Dan Carpenter
2025-08-07 17:02 ` Matthew Brost
2025-09-15 11:12 ` Dan Carpenter
2025-09-15 12:34   ` Rodrigo Vivi

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