From: "Souza, Jose" <jose.souza@intel.com>
To: "airlied@linux.ie" <airlied@linux.ie>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Roper, Matthew D" <matthew.d.roper@intel.com>,
"joonas.lahtinen@linux.intel.com"
<joonas.lahtinen@linux.intel.com>,
"Srivatsa, Anusha" <anusha.srivatsa@intel.com>,
"Laxminarayan Bharadiya,
Pankaj" <pankaj.laxminarayan.bharadiya@intel.com>,
"trix@redhat.com" <trix@redhat.com>,
"wambui.karugax@gmail.com" <wambui.karugax@gmail.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>,
"Kasireddy, Vivek" <vivek.kasireddy@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: fix uninitialized variable
Date: Sat, 29 Aug 2020 01:10:51 +0000 [thread overview]
Message-ID: <3a93ddc0727676afc8878ca11d0afbebe8e5e4ab.camel@intel.com> (raw)
In-Reply-To: <20200825232057.31601-1-trix@redhat.com>
Just merged the first patch that fixed this issue, thanks anyways.
2034c2129bc4a91d471815d4dc7a2a69eaa5338d - drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state
On Tue, 2020-08-25 at 16:20 -0700, trix@redhat.com wrote:
> From: Tom Rix <
> trix@redhat.com
> >
>
> clang static analysis flags this error
>
> intel_combo_phy.c:268:7: warning: The left expression of the
> compound assignment is an uninitialized value.
> The computed value will also be garbage
> ret &= check_phy_reg(...
> ~~~ ^
>
> ret has no initial values, in icl_combo_phy_verify_state() ret is
> set by the next statment and then updated by similar &= logic.
>
> Because the check_phy_req() are only register reads, reorder the
> statements.
>
> Fixes: 239bef676d8e ("drm/i915/display: Implement new combo phy initialization step")
> Signed-off-by: Tom Rix <
> trix@redhat.com
> >
> ---
> drivers/gpu/drm/i915/display/intel_combo_phy.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> index 6968de4f3477..7622ef66c987 100644
> --- a/drivers/gpu/drm/i915/display/intel_combo_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> @@ -264,6 +264,8 @@ static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv,
> if (!icl_combo_phy_enabled(dev_priv, phy))
> return false;
>
> + ret = cnl_verify_procmon_ref_values(dev_priv, phy);
> +
> if (INTEL_GEN(dev_priv) >= 12) {
> ret &= check_phy_reg(dev_priv, phy, ICL_PORT_TX_DW8_LN0(phy),
> ICL_PORT_TX_DW8_ODCC_CLK_SEL |
> @@ -276,8 +278,6 @@ static bool icl_combo_phy_verify_state(struct drm_i915_private *dev_priv,
> DCC_MODE_SELECT_CONTINUOSLY);
> }
>
> - ret = cnl_verify_procmon_ref_values(dev_priv, phy);
> -
> if (phy_is_master(dev_priv, phy)) {
> ret &= check_phy_reg(dev_priv, phy, ICL_PORT_COMP_DW8(phy),
> IREFGEN, IREFGEN);
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2020-08-29 1:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 23:20 [Intel-gfx] [PATCH] drm/i915/display: fix uninitialized variable trix
2020-08-25 23:43 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-08-29 1:10 ` Souza, Jose [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=3a93ddc0727676afc8878ca11d0afbebe8e5e4ab.camel@intel.com \
--to=jose.souza@intel.com \
--cc=airlied@linux.ie \
--cc=anusha.srivatsa@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.d.roper@intel.com \
--cc=pankaj.laxminarayan.bharadiya@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=trix@redhat.com \
--cc=vivek.kasireddy@intel.com \
--cc=wambui.karugax@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox