From: Jean Delvare <jdelvare@suse.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Hardware Monitoring <linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH v2] hwmon: (adm9240) Fix overflows seen when writing into limit attributes
Date: Fri, 9 Dec 2016 10:17:02 +0100 [thread overview]
Message-ID: <20161209101702.244908cb@endymion> (raw)
In-Reply-To: <1481224949-4288-1-git-send-email-linux@roeck-us.net>
On Thu, 8 Dec 2016 11:22:29 -0800, Guenter Roeck wrote:
> Module test reports:
>
> in0_min: Suspected overflow: [3320 vs. 0]
> in0_max: Suspected overflow: [3320 vs. 0]
> in4_min: Suspected overflow: [15938 vs. 0]
> in4_max: Suspected overflow: [15938 vs. 0]
> temp1_max: Suspected overflow: [127000 vs. 0]
> temp1_max_hyst: Suspected overflow: [127000 vs. 0]
> aout_output: Suspected overflow: [1250 vs. 0]
>
> Code analysis reveals that the overflows are caused by conversions
> from unsigned long to long to int, combined with multiplications on
> passed values.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> v2: Improved and simplified clamping
>
> drivers/hwmon/adm9240.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
> (...)
Reviewed-by: Jean Delvare <jdelvare@suse.de>
--
Jean Delvare
SUSE L3 Support
prev parent reply other threads:[~2016-12-09 9:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 19:22 [PATCH v2] hwmon: (adm9240) Fix overflows seen when writing into limit attributes Guenter Roeck
2016-12-09 9:17 ` Jean Delvare [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=20161209101702.244908cb@endymion \
--to=jdelvare@suse.de \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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