lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 21 Sep 2022 12:17:23 +0000
From:   Eliav Farber <farbere@...zon.com>
To:     <jdelvare@...e.com>, <linux@...ck-us.net>,
        <linux-hwmon@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <andriy.shevchenko@...el.com>, <sudipm.mukherjee@...il.com>
CC:     <farbere@...zon.com>, <hhhawa@...zon.com>, <jonnyc@...zon.com>,
        "kernel test robot" <lkp@...el.com>
Subject: [PATCH] hwmon: (mr75203) fix undefined reference to `__divdi3'

Fix build error on 32-bit machines.

Fixes: 381a86c545f1 ("hwmon: (mr75203) modify the temperature equation according to series 5 datasheet")
Signed-off-by: Eliav Farber <farbere@...zon.com>
Reported-by: kernel test robot <lkp@...el.com>
---
I will also rework it into the original series (since it's not just a
trivial squash into one previous commit) and you can decide what to use
according to your preference.

 drivers/hwmon/mr75203.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/mr75203.c b/drivers/hwmon/mr75203.c
index 0fea443dc3e1..9c400cf790b5 100644
--- a/drivers/hwmon/mr75203.c
+++ b/drivers/hwmon/mr75203.c
@@ -266,9 +266,9 @@ static long pvt_calc_temp(struct pvt_device *pvt, u32 nbs)
 	struct temp_coeff *ts_coeff = &pvt->ts_coeff;
 
 	s64 tmp = ts_coeff->g +
-		ts_coeff->h * (s64)nbs / ts_coeff->cal5 -
+		div_s64(ts_coeff->h * (s64)nbs, ts_coeff->cal5) -
 		ts_coeff->h / 2 +
-		ts_coeff->j * (s64)pvt->ip_freq / HZ_PER_MHZ;
+		div_s64(ts_coeff->j * (s64)pvt->ip_freq, HZ_PER_MHZ);
 
 	return clamp_val(tmp, PVT_TEMP_MIN_mC, PVT_TEMP_MAX_mC);
 }
-- 
2.37.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ