hwmon: (mr75203) fix undefined reference to `__divdi3'
PATCH 1/1 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 <[email protected]>
Reported-by kernel test robot <[email protected]>
---
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(-)
drivers/hwmon/mr75203.c +2 -2
@@ -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); }
Signature · 1 line
2.37.1
Quoted 6 lines · Eliav Farber
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 <[email protected]>Reported-by kernel test robot <[email protected]>
Fixed the build of next-20220921 for me.
Tested-by Sudip Mukherjee <[email protected]>
Signature · 2 lines
Regards Sudip
Quoted 5 lines · Eliav Farber
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 <[email protected]>Reported-by kernel test robot <[email protected]>
Applied.
Quoted 5 lines
---
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.
I rather keep this patch separate.
Thanks,
Guenter
Quoted 19 lines
drivers/hwmon/mr75203.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/hwmon/mr75203.c +2
-2@@ -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); }