diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-09-05 14:27:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-06 09:09:34 +0300 |
commit | f6897deef4fc94812338bcf33c9f03854cc19cdb (patch) | |
tree | 17d8e2d4e7a28799dbb2206074a190150ee2d3db /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 618f40ea026bda2866b2b1bc8ae2c7343a3d7a22 (diff) | |
download | linux-f6897deef4fc94812338bcf33c9f03854cc19cdb.tar.xz |
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 <lkp@intel.com>
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20190905112759.13035-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions