* [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
@ 2018-04-27 14:06 ` Dan Carpenter
0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2018-04-27 14:06 UTC (permalink / raw)
To: Jani Nikula; +Cc: David Airlie, intel-gfx, kernel-janitors, Rodrigo Vivi
Smatch complains that "err" could be uninitialized at the end. I don't
know the code well but that seems like a reasonable warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/i915/selftests/intel_workarounds.c b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
index 5455b2626627..17444a3abbb9 100644
--- a/drivers/gpu/drm/i915/selftests/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
@@ -239,7 +239,7 @@ static int live_reset_whitelist(void *arg)
struct intel_engine_cs *engine = i915->engine[RCS];
struct i915_gpu_error *error = &i915->gpu_error;
struct whitelist w;
- int err;
+ int err = 0;
/* If we reset the gpu, we should not lose the RING_NONPRIV */
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
@ 2018-04-27 14:06 ` Dan Carpenter
0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2018-04-27 14:06 UTC (permalink / raw)
To: Jani Nikula; +Cc: David Airlie, intel-gfx, kernel-janitors, Rodrigo Vivi
Smatch complains that "err" could be uninitialized at the end. I don't
know the code well but that seems like a reasonable warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/i915/selftests/intel_workarounds.c b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
index 5455b2626627..17444a3abbb9 100644
--- a/drivers/gpu/drm/i915/selftests/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
@@ -239,7 +239,7 @@ static int live_reset_whitelist(void *arg)
struct intel_engine_cs *engine = i915->engine[RCS];
struct i915_gpu_error *error = &i915->gpu_error;
struct whitelist w;
- int err;
+ int err = 0;
/* If we reset the gpu, we should not lose the RING_NONPRIV */
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
2018-04-27 14:06 ` Dan Carpenter
@ 2018-04-27 14:10 ` Ville Syrjälä
-1 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2018-04-27 14:10 UTC (permalink / raw)
To: Dan Carpenter; +Cc: David Airlie, intel-gfx, kernel-janitors, Rodrigo Vivi
On Fri, Apr 27, 2018 at 05:06:16PM +0300, Dan Carpenter wrote:
> Smatch complains that "err" could be uninitialized at the end. I don't
> know the code well but that seems like a reasonable warning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/gpu/drm/i915/selftests/intel_workarounds.c b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
> index 5455b2626627..17444a3abbb9 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
> @@ -239,7 +239,7 @@ static int live_reset_whitelist(void *arg)
> struct intel_engine_cs *engine = i915->engine[RCS];
> struct i915_gpu_error *error = &i915->gpu_error;
> struct whitelist w;
> - int err;
> + int err = 0;
>
> /* If we reset the gpu, we should not lose the RING_NONPRIV */
Looks like this is already fixed.
commit a3997159133d56e444f0c0f56ab1ae59863912a8
Author: Gustavo A. R. Silva <gustavo@embeddedor.com>
Date: Tue Apr 24 08:15:45 2018 -0500
drm/i915/selftests: Fix uninitialized variable
--
Ville Syrjälä
Intel
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
@ 2018-04-27 14:10 ` Ville Syrjälä
0 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2018-04-27 14:10 UTC (permalink / raw)
To: Dan Carpenter; +Cc: David Airlie, intel-gfx, kernel-janitors, Rodrigo Vivi
On Fri, Apr 27, 2018 at 05:06:16PM +0300, Dan Carpenter wrote:
> Smatch complains that "err" could be uninitialized at the end. I don't
> know the code well but that seems like a reasonable warning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/gpu/drm/i915/selftests/intel_workarounds.c b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
> index 5455b2626627..17444a3abbb9 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_workarounds.c
> @@ -239,7 +239,7 @@ static int live_reset_whitelist(void *arg)
> struct intel_engine_cs *engine = i915->engine[RCS];
> struct i915_gpu_error *error = &i915->gpu_error;
> struct whitelist w;
> - int err;
> + int err = 0;
>
> /* If we reset the gpu, we should not lose the RING_NONPRIV */
Looks like this is already fixed.
commit a3997159133d56e444f0c0f56ab1ae59863912a8
Author: Gustavo A. R. Silva <gustavo@embeddedor.com>
Date: Tue Apr 24 08:15:45 2018 -0500
drm/i915/selftests: Fix uninitialized variable
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
2018-04-27 14:06 ` Dan Carpenter
@ 2018-04-27 14:11 ` Chris Wilson
-1 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2018-04-27 14:11 UTC (permalink / raw)
To: Dan Carpenter, Jani Nikula
Cc: David Airlie, intel-gfx, kernel-janitors, Rodrigo Vivi
Quoting Dan Carpenter (2018-04-27 15:06:16)
> Smatch complains that "err" could be uninitialized at the end. I don't
> know the code well but that seems like a reasonable warning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks for the report, Gustavo Silva already submitted the same fixup.
commit a3997159133d56e444f0c0f56ab1ae59863912a8
Author: Gustavo A. R. Silva <gustavo@embeddedor.com>
Date: Tue Apr 24 08:15:45 2018 -0500
drm/i915/selftests: Fix uninitialized variable
There is a potential execution path in which variable err is
returned without being properly initialized previously.
Fix this by initializing variable err to 0.
Ta,
-Chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
@ 2018-04-27 14:11 ` Chris Wilson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2018-04-27 14:11 UTC (permalink / raw)
To: Dan Carpenter, Jani Nikula
Cc: David Airlie, intel-gfx, kernel-janitors, Rodrigo Vivi
Quoting Dan Carpenter (2018-04-27 15:06:16)
> Smatch complains that "err" could be uninitialized at the end. I don't
> know the code well but that seems like a reasonable warning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks for the report, Gustavo Silva already submitted the same fixup.
commit a3997159133d56e444f0c0f56ab1ae59863912a8
Author: Gustavo A. R. Silva <gustavo@embeddedor.com>
Date: Tue Apr 24 08:15:45 2018 -0500
drm/i915/selftests: Fix uninitialized variable
There is a potential execution path in which variable err is
returned without being properly initialized previously.
Fix this by initializing variable err to 0.
Ta,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
2018-04-27 14:06 ` Dan Carpenter
` (2 preceding siblings ...)
(?)
@ 2018-04-27 14:41 ` Patchwork
-1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2018-04-27 14:41 UTC (permalink / raw)
To: Dan Carpenter; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
URL : https://patchwork.freedesktop.org/series/42407/
State : failure
== Summary ==
Applying: drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/selftests/intel_workarounds.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-04-27 14:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-27 14:06 [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist() Dan Carpenter
2018-04-27 14:06 ` Dan Carpenter
2018-04-27 14:10 ` [Intel-gfx] " Ville Syrjälä
2018-04-27 14:10 ` Ville Syrjälä
2018-04-27 14:11 ` Chris Wilson
2018-04-27 14:11 ` Chris Wilson
2018-04-27 14:41 ` ✗ Fi.CI.BAT: failure for " Patchwork
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.