Re: [PATCH v4 07/15] iio: adc: xilinx-xadc: Simplify common coding patterns
From: Jonathan Cameron
Date: Sun Oct 18 2026 - 19:16:01 EST
> @@ -749,7 +746,7 @@ static int xadc_get_seq_mode(struct xadc *xadc, unsigned long scan_mode)
> if (xadc->external_mux_mode == XADC_EXTERNAL_MUX_DUAL)
> return XADC_CONF1_SEQ_SIMULTANEOUS;
>
> - if ((aux_scan_mode & 0xff00) == 0 || (aux_scan_mode & 0x00ff) == 0)
> + if (!(aux_scan_mode & 0xff00) || !(aux_scan_mode & 0x00ff))
This looks like retrieving a pair of fields. The values of those fields
being what matters rather than no bits set?
If so I'd keep them as == 0.
> return XADC_CONF1_SEQ_CONTINUOUS;
>
> return XADC_CONF1_SEQ_SIMULTANEOUS;