Re: [PATCH 4/6] iio: adc: ad7173: refactor ain and vref selection

From: David Lechner
Date: Wed Apr 03 2024 - 12:05:31 EST


On Wed, Apr 3, 2024 at 5:03 AM Ceclan, Dumitru <mitrutzceclan@gmailcom> wrote:
>
> On 01/04/2024 22:40, David Lechner wrote:
> > On Mon, Apr 1, 2024 at 10:10 AM Dumitru Ceclan via B4 Relay
> > <devnull+dumitru.ceclan.analog.com@xxxxxxxxxx> wrote:
> >>
> >> From: Dumitru Ceclan <dumitru.ceclan@xxxxxxxxxx>
> >>
> >> Move validation of analog inputs and reference voltage selection to
> >> separate functions.
> >>
> >> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@xxxxxxxxxx>
> >> ---
> >
> > Same as my comment on PATCH 3/6. We would like to know why this change
> > is being made.
>
> Move validation of analog inputs and reference voltage selection to
> separate functions to reduce the size of the channel config parsing function.
>
> Good?

Better. But it still only says what is being done and doesn't answer
the question "why?".

"to reduce the size of the function to make it easier to read"
explains why reducing the size of the function makes it an
improvement.