[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200724122148.26541-1-zhang.lyra@gmail.com>
Date: Fri, 24 Jul 2020 20:21:46 +0800
From: Chunyan Zhang <zhang.lyra@...il.com>
To: Sebastian Reichel <sre@...nel.org>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang7@...il.com>,
Chunyan Zhang <chunyan.zhang@...soc.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Chen Yongzhi <yongzhi.chen@...soc.com>
Subject: [PATCH v2 0/2] fix an overflow error on sc27xx power supply
From: Chunyan Zhang <chunyan.zhang@...soc.com>
The patch 2/2 fixes an overflow error by changing to 64-bit divide operations.
In order to avoid compile error on 32-bit architectures, this patchset
also introduced a new 64-bit helper in patch 1/2.
Changes since v1: (https://lkml.org/lkml/2020/7/17/63)
- Added new help macro DIV_S64_ROUND_CLOSEST;
- Fixed an error reported by kernel test robot <lkp@...el.com>.
Chunyan Zhang (2):
math64: New DIV_S64_ROUND_CLOSEST helper
power: supply: sc27xx: prevent adc * 1000 from overflow
drivers/power/supply/sc27xx_fuel_gauge.c | 9 +++++----
include/linux/math64.h | 19 +++++++++++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
--
2.20.1
Powered by blists - more mailing lists