Re: [PATCH 2/2] iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers
From: Andy Shevchenko
Date: Wed Jun 10 2026 - 07:05:51 EST
On Wed, Jun 10, 2026 at 04:24:18AM +0000, Hungyu Lin wrote:
> Replace open-coded bitfield operations with FIELD_PREP() and
> FIELD_GET() helpers where appropriate.
>
> Also simplify bmc150_magn_set_odr() by returning directly from
> the matching table entry.
...
> - odr_val = (reg_val & BMC150_MAGN_MASK_ODR) >> BMC150_MAGN_SHIFT_ODR;
> +
> + odr_val = FIELD_GET(BMC150_MAGN_MASK_ODR, reg_val);
Same comment as per previous few versions. I don't understand why you haven't
addressed it. Did I miss your reply on this?
--
With Best Regards,
Andy Shevchenko