Re: [PATCH v1 4/4] iio: light: opt4001: Fix reversed GENMASK() arguments in fault count mask

From: Andy Shevchenko

Date: Mon Jul 13 2026 - 07:26:27 EST


On Mon, Jul 13, 2026 at 01:54:51AM +0530, Nikhil Gautam wrote:
> GENMASK(h, l) requires h >= l, but OPT4001_CTRL_FAULT_COUNT is defined
> as GENMASK(0, 1). The define is currently unused so there is no
> functional impact, but fix it before anyone builds on it, and add the
> _MASK suffix for consistency with the neighbouring definitions.

...

> #define OPT4001_CTRL_OPER_MODE_MASK GENMASK(5, 4)
> #define OPT4001_CTRL_LATCH_MASK GENMASK(3, 3)
> #define OPT4001_CTRL_INT_POL_MASK GENMASK(2, 2)
> -#define OPT4001_CTRL_FAULT_COUNT GENMASK(0, 1)
> +#define OPT4001_CTRL_FAULT_COUNT_MASK GENMASK(1, 0)

The original indentation uses spaces only, please keep it the same style. Yeah,
it's supposed to use tabs, but here we are (it might be the material for another
change in the future).

--
With Best Regards,
Andy Shevchenko