public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] drm/i915/dp: silence a static checker warning
Date: Thu, 03 May 2018 16:40:00 +0000	[thread overview]
Message-ID: <20180503164000.GJ2054@intel.com> (raw)
In-Reply-To: <20180503105306.GA5315@mwanda>

On Thu, May 03, 2018 at 01:53:22PM +0300, Dan Carpenter wrote:
> 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.

I usually would just ask if it would be possible to dispositioning
as false positive or intentional on the tool, but it looks better
indeed...

so, why not?!

> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.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)

  reply	other threads:[~2018-05-03 16:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 10:53 [PATCH] drm/i915/dp: silence a static checker warning Dan Carpenter
2018-05-03 16:40 ` Rodrigo Vivi [this message]
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=20180503164000.GJ2054@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@linux.ie \
    --cc=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.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