diff options
author | Andy Shevchenko <[email protected]> | 2019-09-05 14:27:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2019-09-06 08:09:34 +0200 |
commit | f6897deef4fc94812338bcf33c9f03854cc19cdb (patch) | |
tree | 17d8e2d4e7a28799dbb2206074a190150ee2d3db /lib/memory-notifier-error-inject.c | |
parent | 618f40ea026bda2866b2b1bc8ae2c7343a3d7a22 (diff) |
iio: hid-sensor-attributes: Fix divisions for 32-bit platforms
The commit 473d12f7638c
("iio: hid-sensor-attributes: Convert to use int_pow()")
converted to use generic int_pow() helper. Though, the generic one returns
64-bit value and, in cases when it is used as divisor, it compels 64-bit
division from compiler.
In order to fix this, introduce a temporary 32-bit variable to hold the result
of int_pow() and use it as divisor afterwards.
In couple of cases, replace int_pow() with a predefined unit factors for time
and frequency.
Fixes: 473d12f7638c ("iio: hid-sensor-attributes: Convert to use int_pow()")
Reported-by: kbuild test robot <[email protected]>
Reported-by: Nathan Chancellor <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions