Message ID | 20241204013620.862943-3-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | iio: afe: rescale: A few cleanups | expand |
diff --git a/drivers/iio/afe/iio-rescale.c b/drivers/iio/afe/iio-rescale.c index 470dd7d41b2a..9d33e7aabe4d 100644 --- a/drivers/iio/afe/iio-rescale.c +++ b/drivers/iio/afe/iio-rescale.c @@ -8,6 +8,7 @@ * Author: Peter Rosin <peda@axentia.se> */ +#include <linux/bits.h> #include <linux/err.h> #include <linux/gcd.h> #include <linux/mod_devicetable.h> @@ -62,7 +63,7 @@ int rescale_process_scale(struct rescale *rescale, int scale_type, if (scale_type == IIO_VAL_FRACTIONAL) tmp = *val2; else - tmp = ULL(1) << *val2; + tmp = BIT_ULL(*val2); rem2 = *val % (int)tmp; *val = *val / (int)tmp;
ULL(1) << x is just an open-coded implementation of BIT_ULL(). Replace the former by the latter. Note, the rest of the code properly uses BIT()/BIT_ULL() already. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/iio/afe/iio-rescale.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)