Re: [PATCH v4 04/15] iio: adc: xilinx-xadc: Drop unnecessary masking and dead code
From: Jonathan Cameron
Date: Sun Oct 18 2026 - 19:05:38 EST
On Mon, 5 Oct 2026 15:11:54 +0530
Dileep Kumar Nagavarapu <dileepkumar.nagavarapu@xxxxxxx> wrote:
> Remove a no-operation bitwise-OR with zero (dead code) and the redundant
> 16-bit masking when storing values into u16 destinations, where the
> mask has no effect. Also remove the unused macros.
Hi Dileep,
Why? If they are expressing the rest of the fields in a register
simply knowing there is stuff there an be useful even if not
explicitly used. There are three approaches I tend to accept to
such defines.
1) Comprehensive. Sometimes it is just easier to define anything -
particularly if codegen involved.
2) Comprehensive for a subset of registers + nothing for the contents
of other registers - fits the above definition of useful by defining
what the bits we are leaving alone do.
3) Exactly what is used. I actually don't particularly like this and
prefer option (2) but I don't tend to consider it a reason to not
merge a driver.
Now, if the stuff you are dropping is inconsistent across IPs or similar
then that is fine, but say so here.
Jonathan
>
> No functional change intended.
>
> Co-developed-by: Sai Krishna Potthuri <sai.krishna.potthuri@xxxxxxx>
> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@xxxxxxx>
> Signed-off-by: Dileep Kumar Nagavarapu <dileepkumar.nagavarapu@xxxxxxx>