From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0
Date: Wed, 14 Aug 2013 10:53:30 +0000 [thread overview]
Message-ID: <20130814105330.GD4713@mwanda> (raw)
In-Reply-To: <20130814094526.GE521@elgon.mountain>
On Wed, Aug 14, 2013 at 12:45:26PM +0300, Dan Carpenter wrote:
> The callers never check for negative but they sometimes check for zero
> returns:
>
> int reg = ADT7462_REG_VOLT_MAX(data, i);
> data->volt_max[i] > (reg ? i2c_smbus_read_byte_data(client, reg) : 0);
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Static checker stuff. I don't have this hardware.
I should have also said that not all the callers check for error.
I don't know if that is a problem.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [lm-sensors] [patch] hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0
Date: Wed, 14 Aug 2013 10:53:30 +0000 [thread overview]
Message-ID: <20130814105330.GD4713@mwanda> (raw)
In-Reply-To: <20130814094526.GE521@elgon.mountain>
On Wed, Aug 14, 2013 at 12:45:26PM +0300, Dan Carpenter wrote:
> The callers never check for negative but they sometimes check for zero
> returns:
>
> int reg = ADT7462_REG_VOLT_MAX(data, i);
> data->volt_max[i] > (reg ? i2c_smbus_read_byte_data(client, reg) : 0);
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Static checker stuff. I don't have this hardware.
I should have also said that not all the callers check for error.
I don't know if that is a problem.
regards,
dan carpenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2013-08-14 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 9:45 [patch] hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0 Dan Carpenter
2013-08-14 9:45 ` [lm-sensors] " Dan Carpenter
2013-08-14 10:53 ` Dan Carpenter [this message]
2013-08-14 10:53 ` Dan Carpenter
2013-08-14 14:06 ` Guenter Roeck
2013-08-14 14:06 ` [lm-sensors] " Guenter Roeck
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=20130814105330.GD4713@mwanda \
--to=dan.carpenter@oracle.com \
--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 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.