public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Thomas Hellstr?m <thomas.hellstrom@linux.intel.com>,
	Micha?? Winiarski <michal.winiarski@intel.com>,
	David Airlie <airlied@linux.ie>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Zhihao Cheng <chengzhihao1@huawei.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: fix some error codes in __cancel_reset()
Date: Fri, 4 Feb 2022 16:46:51 -0500	[thread overview]
Message-ID: <Yf2ey71PCUN1n0oK@intel.com> (raw)
In-Reply-To: <Yf1mT6cFanBUgEXa@intel.intel>

On Fri, Feb 04, 2022 at 06:45:51PM +0100, Andi Shyti wrote:
> Hi Dan,
> 
> > There were two error paths in __cancel_reset() which return success
> > instead of a negative error code as expected.
> > 
> > Fixes: 4e6835466771 ("drm/i915/selftests: Add a cancel request selftest that triggers a reset")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > >From static analysis.  I am not 100% sure this.  Please review extra
> > carefully!
> > 
> >  drivers/gpu/drm/i915/selftests/i915_request.c | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests/i915_request.c
> > index 2a99dd7c2fe8..05e9f977757b 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_request.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_request.c
> > @@ -809,7 +809,8 @@ static int __cancel_reset(struct drm_i915_private *i915,
> >  	preempt_timeout_ms = engine->props.preempt_timeout_ms;
> >  	engine->props.preempt_timeout_ms = 100;
> >  
> > -	if (igt_spinner_init(&spin, engine->gt))
> > +	err = igt_spinner_init(&spin, engine->gt);
> > +	if (err)
> >  		goto out_restore;
> >  
> >  	ce = intel_context_create(engine);
> > @@ -838,8 +839,10 @@ static int __cancel_reset(struct drm_i915_private *i915,
> >  	}
> >  
> >  	nop = intel_context_create_request(ce);
> > -	if (IS_ERR(nop))
> > +	if (IS_ERR(nop)) {
> > +		err = PTR_ERR(nop);
> >  		goto out_rq;
> > +	}
> 
> Looks correct to me:
> 
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

We need a rebased version to be sent...
Sorry for the delay here...

> 
> Thank you,
> Andi

      reply	other threads:[~2022-02-04 21:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  8:49 [Intel-gfx] [PATCH] drm/i915/selftests: fix some error codes in __cancel_reset() Dan Carpenter
2022-01-27  9:57 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-01-28  0:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: fix some error codes in __cancel_reset() (rev2) Patchwork
2022-01-28  5:16 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-04 17:45 ` [Intel-gfx] [PATCH] drm/i915/selftests: fix some error codes in __cancel_reset() Andi Shyti
2022-02-04 21:46   ` Rodrigo Vivi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yf2ey71PCUN1n0oK@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@linux.ie \
    --cc=andi.shyti@linux.intel.com \
    --cc=chengzhihao1@huawei.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=michal.winiarski@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox