From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Silence GCC warning for cmn_a_well
Date: Tue, 16 Aug 2016 12:42:19 +0300 [thread overview]
Message-ID: <1471340539.31740.1.camel@intel.com> (raw)
In-Reply-To: <1471284383-22324-1-git-send-email-chris@chris-wilson.co.uk>
On ma, 2016-08-15 at 19:06 +0100, Chris Wilson wrote:
> Just make the logic simple enough for even GCC to understand (and
> foolproof against random changes):
>
> drivers/gpu/drm/i915/intel_runtime_pm.c: warning: 'cmn_a_well' may be
> used uninitialized in this function [-Wuninitialized]: => 871:23
>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/intel_runtime_pm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index d659d6f..a1d73c2 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -856,7 +856,7 @@ static void bxt_dpio_cmn_power_well_enable(struct drm_i915_private *dev_priv,
> struct i915_power_well *power_well)
> {
> enum skl_disp_power_wells power_well_id = power_well->data;
> - struct i915_power_well *cmn_a_well;
> + struct i915_power_well *cmn_a_well = NULL;
>
> if (power_well_id == BXT_DPIO_CMN_BC) {
> /*
> @@ -869,7 +869,7 @@ static void bxt_dpio_cmn_power_well_enable(struct drm_i915_private *dev_priv,
>
> bxt_ddi_phy_init(dev_priv, bxt_power_well_to_phy(power_well));
>
> - if (power_well_id == BXT_DPIO_CMN_BC)
> + if (cmn_a_well)
> intel_power_well_put(dev_priv, cmn_a_well);
> }
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-08-16 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 18:06 [PATCH] drm/i915: Silence GCC warning for cmn_a_well Chris Wilson
2016-08-16 5:27 ` ✗ Ro.CI.BAT: warning for " Patchwork
2016-08-16 9:42 ` Imre Deak [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=1471340539.31740.1.camel@intel.com \
--to=imre.deak@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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