Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v1 1/1] iio: afe: rescale: Don't use ULL(1) << x instead of BIT(x)
@ 2026-11-17 10:12 Andy Shevchenko
  2026-11-18  8:28 ` Joshua Crofts
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2026-11-17 10:12 UTC (permalink / raw)
  To: Andy Shevchenko, linux-iio
  Cc: Peter Rosin, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/afe/iio-rescale.c b/drivers/iio/afe/iio-rescale.c
index b3cc610b48b8..25e179a3706b 100644
--- a/drivers/iio/afe/iio-rescale.c
+++ b/drivers/iio/afe/iio-rescale.c
@@ -67,7 +67,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;
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-18  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 10:12 [PATCH v1 1/1] iio: afe: rescale: Don't use ULL(1) << x instead of BIT(x) Andy Shevchenko
2026-11-18  8:28 ` Joshua Crofts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox