Re: [PATCH 8/8] iio: magnetometer: ak8975: make use of the macros from bits.h
From: Andy Shevchenko
Date: Sat May 09 2026 - 13:17:25 EST
On Sat, May 09, 2026 at 10:09:03AM +0100, Nuno Sá wrote:
> On Thu, 2026-05-07 at 16:35 +0200, Joshua Crofts via B4 Relay wrote:
> > Make use of BIT() and GENMASK() where it makes sense.
...
> > -static const unsigned long ak8975_scan_masks[] = { 0x7, 0 };
> > +static const unsigned long ak8975_scan_masks[] = {
> > + BIT(AK8975_SCAN_X) | BIT(AK8975_SCAN_Y) | BIT(AK8975_SCAN_Z),
>
> Small nit: But maybe GENMASK().
Jonathan explained that this is *not* a bitmask while looks and feels like it.
So it is his request to not do a GENMASK() here.
> > + 0
> > +};
--
With Best Regards,
Andy Shevchenko