* [PATCH] Fix wrong initializer for "locked" variable
@ 2011-08-25 13:37 Thomas Jarosch
2011-08-25 16:22 ` Jesse Barnes
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Jarosch @ 2011-08-25 13:37 UTC (permalink / raw)
To: dri-devel
Otherwise it just contains random memory.
Issue detected by cppcheck.
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
---
drivers/gpu/drm/i915/intel_display.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ee1d701..f6da4e4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -878,7 +878,7 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
int pp_reg, lvds_reg;
u32 val;
enum pipe panel_pipe = PIPE_A;
- bool locked = locked;
+ bool locked = true;
if (HAS_PCH_SPLIT(dev_priv->dev)) {
pp_reg = PCH_PP_CONTROL;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Fix wrong initializer for "locked" variable
2011-08-25 13:37 [PATCH] Fix wrong initializer for "locked" variable Thomas Jarosch
@ 2011-08-25 16:22 ` Jesse Barnes
0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2011-08-25 16:22 UTC (permalink / raw)
To: Thomas Jarosch; +Cc: dri-devel
On Thu, 25 Aug 2011 15:37:45 +0200
Thomas Jarosch <thomas.jarosch@intra2net.com> wrote:
> Otherwise it just contains random memory.
>
> Issue detected by cppcheck.
>
> Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index ee1d701..f6da4e4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -878,7 +878,7 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv,
> int pp_reg, lvds_reg;
> u32 val;
> enum pipe panel_pipe = PIPE_A;
> - bool locked = locked;
> + bool locked = true;
>
> if (HAS_PCH_SPLIT(dev_priv->dev)) {
> pp_reg = PCH_PP_CONTROL;
Hah yeah that's a good one, thanks for the fix.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-25 16:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-25 13:37 [PATCH] Fix wrong initializer for "locked" variable Thomas Jarosch
2011-08-25 16:22 ` Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox