From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: rtc-linux@googlegroups.com, Zhuang Yuyao <mlistz@gmail.com>,
Zhuang Yuyao <zhuangyy@syan.com.cn>,
Michael Tatarinov <kukabu@gmail.com>,
Alessandro Zummo <a.zummo@towertech.it>
Subject: [rtc-linux] Re: [PATCH] rtc: ds1307: ds3231 temperature s16 overflow
Date: Tue, 19 Apr 2016 00:36:23 +0200 [thread overview]
Message-ID: <20160418223623.GD25196@piout.net> (raw)
In-Reply-To: <1460938902-3120-1-git-send-email-akinobu.mita@gmail.com>
On 18/04/2016 at 09:21:42 +0900, Akinobu Mita wrote :
> From: Zhuang Yuyao <mlistz@gmail.com>
>
> while retrieving temperature from ds3231, the result may be overflow
> since s16 is too small for a multiplication with 250.
>
> ie. if temp_buf[0] == 0x2d, the result (s16 temp) will be negative.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Zhuang Yuyao <mlistz@gmail.com>
> Cc: Zhuang Yuyao <zhuangyy@syan.com.cn>
> Cc: Michael Tatarinov <kukabu@gmail.com>
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> drivers/rtc/rtc-ds1307.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
prev parent reply other threads:[~2016-04-18 22:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 0:21 [rtc-linux] [PATCH] rtc: ds1307: ds3231 temperature s16 overflow Akinobu Mita
2016-04-18 4:33 ` [rtc-linux] " Michael Tatarinov
2016-04-18 4:54 ` Michael Tatarinov
2016-04-18 10:24 ` Michael Tatarinov
2016-04-18 13:05 ` Akinobu Mita
2016-04-18 14:44 ` Michael Tatarinov
2016-04-18 22:36 ` Alexandre Belloni [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=20160418223623.GD25196@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=a.zummo@towertech.it \
--cc=akinobu.mita@gmail.com \
--cc=kukabu@gmail.com \
--cc=mlistz@gmail.com \
--cc=rtc-linux@googlegroups.com \
--cc=zhuangyy@syan.com.cn \
/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