linux/drivers/iio/afe
Liam Beguin 2eb30577f2 iio: afe: rescale: reduce risk of integer overflow
Reduce the risk of integer overflow by doing the scale calculation on
a 64-bit integer. Since the rescaling is only performed on *val, reuse
the IIO_VAL_FRACTIONAL_LOG2 case.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Reviewed-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220213025739.2561834-6-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-02-27 13:38:22 +00:00
..
iio-rescale.c iio: afe: rescale: reduce risk of integer overflow 2022-02-27 13:38:22 +00:00
Kconfig
Makefile