* [PATCH][next] drm/i915: remove redundant variable err
@ 2019-10-09 9:39 Colin King
2019-10-09 9:49 ` Chris Wilson
2019-10-09 9:52 ` Jani Nikula
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-10-09 9:39 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
Daniel Vetter, intel-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
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>
---
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;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH][next] drm/i915: remove redundant variable err
2019-10-09 9:39 [PATCH][next] drm/i915: remove redundant variable err Colin King
@ 2019-10-09 9:49 ` Chris Wilson
2019-10-09 9:52 ` Jani Nikula
1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2019-10-09 9:49 UTC (permalink / raw)
To: Colin King, Daniel Vetter, David Airlie, Jani Nikula,
Joonas Lahtinen, Rodrigo Vivi, dri-devel, intel-gfx
Cc: kernel-janitors, linux-kernel
Quoting Colin King (2019-10-09 10:39:35)
> 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.
Oh, we add one again shortly. Might as well wait.
-Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][next] drm/i915: remove redundant variable err
2019-10-09 9:39 [PATCH][next] drm/i915: remove redundant variable err Colin King
2019-10-09 9:49 ` Chris Wilson
@ 2019-10-09 9:52 ` Jani Nikula
1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2019-10-09 9:52 UTC (permalink / raw)
To: Colin King, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
Daniel Vetter, intel-gfx, dri-devel
Cc: kernel-janitors, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-09 9:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-09 9:39 [PATCH][next] drm/i915: remove redundant variable err Colin King
2019-10-09 9:49 ` Chris Wilson
2019-10-09 9:52 ` Jani Nikula
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).