[PATCH v4 07/15] iio: adc: xilinx-xadc: Simplify common coding patterns
Jonathan Cameron
jic23 at kernel.org
Sun Oct 18 16:14:14 PDT 2026
> @@ -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;
More information about the linux-arm-kernel
mailing list