All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 1/2] hwmon: (lm90) Fix warnings
Date: Mon, 29 Aug 2011 15:08:51 +0000	[thread overview]
Message-ID: <1314630531.2796.148.camel@groeck-laptop> (raw)
In-Reply-To: <20110829133835.3b8fb7f2@endymion.delvare>

On Mon, 2011-08-29 at 07:38 -0400, Jean Delvare wrote:
> With some configuration option combinations, we get the following
> warnings:
> 
> drivers/hwmon/lm90.c: In function 'lm90_detect':
> drivers/hwmon/lm90.c:1114: warning: 'chip_id' may be used uninitialized
> in this function
> drivers/hwmon/lm90.c:1114: warning: 'reg_config1' may be used
> uninitialized in this function
> drivers/hwmon/lm90.c:1114: warning: 'reg_convrate' may be used
> uninitialized in this function
> drivers/hwmon/lm90.c:1187: warning: 'reg_emerg2' may be used
> uninitialized in this function
> drivers/hwmon/lm90.c:1187: warning: 'reg_status2' may be used
> uninitialized in this function
> 
> We can solve these easily by reading the register values first and
> checking for errors later. These errors should be very rare, even in
> the case of failed detection, so this change has no impact on
> performance. And this makes checkpatch.pl happier.
> 
> Reported-by: Guenter Roeck <guenter.roeck@ericsson.com>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>

Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>

Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

      reply	other threads:[~2011-08-29 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 11:38 [lm-sensors] [PATCH 1/2] hwmon: (lm90) Fix warnings Jean Delvare
2011-08-29 15:08 ` Guenter Roeck [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=1314630531.2796.148.camel@groeck-laptop \
    --to=guenter.roeck@ericsson.com \
    --cc=lm-sensors@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 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.