public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Chris Wilson <chris.p.wilson@intel.com>
Cc: "Michał Winiarski" <michal.winiarski@intel.com>,
	"David Airlie" <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: fix a couple IS_ERR() vs NULL tests
Date: Fri, 8 Jul 2022 10:02:34 +0100	[thread overview]
Message-ID: <861d92ff-1d30-10f5-e10b-403980af503b@intel.com> (raw)
In-Reply-To: <Ysftmk147JdS1gVu@kili>

On 08/07/2022 09:40, Dan Carpenter wrote:
> The shmem_pin_map() function doesn't return error pointers, it returns
> NULL.
> 
> Fixes: a0d3fdb628b8 ("drm/i915/gt: Split logical ring contexts from execlist submission"

I think this should be:

Fixes: be1cb55a07bf ("drm/i915/gt: Keep a no-frills swappable copy of 
the default context state")

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

There looks to be one more in gvt/cmd_parser.c?

Otherwise,
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

> ---
>   drivers/gpu/drm/i915/gt/selftest_lrc.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> index 8b2c11dbe354..1109088fe8f6 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> @@ -176,8 +176,8 @@ static int live_lrc_layout(void *arg)
>   			continue;
>   
>   		hw = shmem_pin_map(engine->default_state);
> -		if (IS_ERR(hw)) {
> -			err = PTR_ERR(hw);
> +		if (!hw) {
> +			err = -ENOMEM;
>   			break;
>   		}
>   		hw += LRC_STATE_OFFSET / sizeof(*hw);
> @@ -365,8 +365,8 @@ static int live_lrc_fixed(void *arg)
>   			continue;
>   
>   		hw = shmem_pin_map(engine->default_state);
> -		if (IS_ERR(hw)) {
> -			err = PTR_ERR(hw);
> +		if (!hw) {
> +			err = -ENOMEM;
>   			break;
>   		}
>   		hw += LRC_STATE_OFFSET / sizeof(*hw);

  reply	other threads:[~2022-07-08  9:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08  8:40 [Intel-gfx] [PATCH] drm/i915/selftests: fix a couple IS_ERR() vs NULL tests Dan Carpenter
2022-07-08  9:02 ` Matthew Auld [this message]
2022-07-08  9:28   ` Dan Carpenter
2022-07-08  9:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-07-08 20:01 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=861d92ff-1d30-10f5-e10b-403980af503b@intel.com \
    --to=matthew.auld@intel.com \
    --cc=airlied@linux.ie \
    --cc=chris.p.wilson@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=michal.winiarski@intel.com \
    --cc=rodrigo.vivi@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