The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Wan Jiabing <wanjiabing@vivo.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Jason Ekstrand <jason@jlekstrand.net>,
	Matthew Brost <matthew.brost@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: kael_w@yeah.net
Subject: Re: [PATCH] drm/i915: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Date: Mon, 25 Oct 2021 16:42:24 +0100	[thread overview]
Message-ID: <58331d3d-c3e3-0e82-eb7a-469c6e72d7a7@intel.com> (raw)
In-Reply-To: <20211025113316.24424-1-wanjiabing@vivo.com>

On 25/10/2021 12:32, Wan Jiabing wrote:
> Fix following coccicheck warning:
> ./drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:3117:15-22: WARNING:
> ERR_CAST can be used with eb->requests[i].
> 
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>

Pushed to drm-intel-gt-next. Thanks.

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index 4d7da07442f2..eb2dcaf78d08 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -3114,7 +3114,7 @@ eb_requests_create(struct i915_execbuffer *eb, struct dma_fence *in_fence,
>   		/* Allocate a request for this batch buffer nice and early. */
>   		eb->requests[i] = i915_request_create(eb_find_context(eb, i));
>   		if (IS_ERR(eb->requests[i])) {
> -			out_fence = ERR_PTR(PTR_ERR(eb->requests[i]));
> +			out_fence = ERR_CAST(eb->requests[i]);
>   			eb->requests[i] = NULL;
>   			return out_fence;
>   		}
> 

      reply	other threads:[~2021-10-25 15:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 11:32 [PATCH] drm/i915: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) Wan Jiabing
2021-10-25 15:42 ` Matthew Auld [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=58331d3d-c3e3-0e82-eb7a-469c6e72d7a7@intel.com \
    --to=matthew.auld@intel.com \
    --cc=airlied@linux.ie \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jason@jlekstrand.net \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kael_w@yeah.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.brost@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=wanjiabing@vivo.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