All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Qing Xu <qingx@marvell.com>
Cc: lrg@ti.com, haojian.zhuang@gmail.com, cxie4@marvell.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: max8925: fix compiler warnings
Date: Fri, 23 Nov 2012 10:41:36 +0900	[thread overview]
Message-ID: <20121123014135.GC4385@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1353550266-21330-1-git-send-email-qingx@marvell.com>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

On Thu, Nov 22, 2012 at 10:11:06AM +0800, Qing Xu wrote:

> -	int i, regulator_idx;
> +	int i;
> +	int regulator_idx = 0;

This sort of fix is rarely good without some analysis as to why this is
a sensible initialisation to do, just unconditionally initialising may
be masking a real issue in the control flow which the compiler has
identified.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-11-23  1:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  2:11 [PATCH] regulator: max8925: fix compiler warnings Qing Xu
2012-11-23  1:41 ` Mark Brown [this message]
2012-11-23  2:27   ` Qing Xu
2012-11-24 17:55     ` Mark Brown
2012-11-26  3:07       ` Qing Xu

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=20121123014135.GC4385@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=cxie4@marvell.com \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=qingx@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.