From: Jani Nikula <jani.nikula@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] drm/i915: remove redundant variable err
Date: Wed, 09 Oct 2019 09:52:15 +0000 [thread overview]
Message-ID: <87h84igsa8.fsf@intel.com> (raw)
In-Reply-To: <20191009093935.17895-1-colin.king@canonical.com>
On Wed, 09 Oct 2019, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> An earlier commit removed any error assignments to err and we
> are now left with a zero assignment to err and a check that is
> always false. Clean this up by removing the redundant variable
> err and the error check.
>
> Addresses-Coverity: ("'Constant' variable guard")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
BR,
Jani.
> ---
> drivers/gpu/drm/i915/i915_active.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
> index aa37c07004b9..67305165c12a 100644
> --- a/drivers/gpu/drm/i915/i915_active.c
> +++ b/drivers/gpu/drm/i915/i915_active.c
> @@ -438,7 +438,6 @@ static void enable_signaling(struct i915_active_fence *active)
> int i915_active_wait(struct i915_active *ref)
> {
> struct active_node *it, *n;
> - int err = 0;
>
> might_sleep();
>
> @@ -456,8 +455,6 @@ int i915_active_wait(struct i915_active *ref)
> /* Any fence added after the wait begins will not be auto-signaled */
>
> i915_active_release(ref);
> - if (err)
> - return err;
>
> if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
> return -EINTR;
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] drm/i915: remove redundant variable err
Date: Wed, 09 Oct 2019 12:52:15 +0300 [thread overview]
Message-ID: <87h84igsa8.fsf@intel.com> (raw)
In-Reply-To: <20191009093935.17895-1-colin.king@canonical.com>
On Wed, 09 Oct 2019, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> An earlier commit removed any error assignments to err and we
> are now left with a zero assignment to err and a check that is
> always false. Clean this up by removing the redundant variable
> err and the error check.
>
> Addresses-Coverity: ("'Constant' variable guard")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
BR,
Jani.
> ---
> drivers/gpu/drm/i915/i915_active.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
> index aa37c07004b9..67305165c12a 100644
> --- a/drivers/gpu/drm/i915/i915_active.c
> +++ b/drivers/gpu/drm/i915/i915_active.c
> @@ -438,7 +438,6 @@ static void enable_signaling(struct i915_active_fence *active)
> int i915_active_wait(struct i915_active *ref)
> {
> struct active_node *it, *n;
> - int err = 0;
>
> might_sleep();
>
> @@ -456,8 +455,6 @@ int i915_active_wait(struct i915_active *ref)
> /* Any fence added after the wait begins will not be auto-signaled */
>
> i915_active_release(ref);
> - if (err)
> - return err;
>
> if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
> return -EINTR;
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Colin King <colin.king@canonical.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] drm/i915: remove redundant variable err
Date: Wed, 09 Oct 2019 12:52:15 +0300 [thread overview]
Message-ID: <87h84igsa8.fsf@intel.com> (raw)
In-Reply-To: <20191009093935.17895-1-colin.king@canonical.com>
On Wed, 09 Oct 2019, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> An earlier commit removed any error assignments to err and we
> are now left with a zero assignment to err and a check that is
> always false. Clean this up by removing the redundant variable
> err and the error check.
>
> Addresses-Coverity: ("'Constant' variable guard")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
BR,
Jani.
> ---
> drivers/gpu/drm/i915/i915_active.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
> index aa37c07004b9..67305165c12a 100644
> --- a/drivers/gpu/drm/i915/i915_active.c
> +++ b/drivers/gpu/drm/i915/i915_active.c
> @@ -438,7 +438,6 @@ static void enable_signaling(struct i915_active_fence *active)
> int i915_active_wait(struct i915_active *ref)
> {
> struct active_node *it, *n;
> - int err = 0;
>
> might_sleep();
>
> @@ -456,8 +455,6 @@ int i915_active_wait(struct i915_active *ref)
> /* Any fence added after the wait begins will not be auto-signaled */
>
> i915_active_release(ref);
> - if (err)
> - return err;
>
> if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
> return -EINTR;
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2019-10-09 9:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 9:39 [PATCH][next] drm/i915: remove redundant variable err Colin King
2019-10-09 9:39 ` Colin King
2019-10-09 9:39 ` Colin King
2019-10-09 9:49 ` Chris Wilson
2019-10-09 9:49 ` Chris Wilson
2019-10-09 9:52 ` Jani Nikula [this message]
2019-10-09 9:52 ` Jani Nikula
2019-10-09 9:52 ` Jani Nikula
2019-10-09 14:18 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-10-09 19:34 ` ✓ Fi.CI.IGT: " 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=87h84igsa8.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=colin.king@canonical.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.