From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH] drm/i915/dp: silence a static checker warning
Date: Thu, 03 May 2018 10:53:22 +0000 [thread overview]
Message-ID: <20180503105306.GA5315@mwanda> (raw)
Smatch warns that "n_entries" isn't always set. It would trigger a
some WARN_ON()s on that path so presumably it can't happen but it's
simple enough to initialize it to zero just to silence the warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 8225d223f452..f4951ae33ac2 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2062,7 +2062,7 @@ u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder)
{
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
enum port port = encoder->port;
- int n_entries;
+ int n_entries = 0;
if (IS_ICELAKE(dev_priv)) {
if (port = PORT_A || port = PORT_B)
next reply other threads:[~2018-05-03 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 10:53 Dan Carpenter [this message]
2018-05-03 16:40 ` [PATCH] drm/i915/dp: silence a static checker warning Rodrigo Vivi
2018-05-04 15:15 ` [Intel-gfx] " Chris Wilson
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=20180503105306.GA5315@mwanda \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=rodrigo.vivi@intel.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