Re: [PATCH v7 08/11] iio: adc: hx711: split variable assignments in hx711_read and hx711_reset
From: Andy Shevchenko
Date: Mon May 11 2026 - 07:22:55 EST
On Mon, May 11, 2026 at 01:19:30AM +0530, Piyush Patle wrote:
> Separate the initial value assignments from the declarations in
> hx711_read() and hx711_reset().
>
> This is a small preparatory cleanup before the later loop-iterator and
> variant-specific changes adjust the local variable layout in these
> functions.
...
> static int hx711_reset(struct hx711_data *hx711_data)
> {
> - int val = hx711_wait_for_ready(hx711_data);
> + int val;
> + val = hx711_wait_for_ready(hx711_data);
>
> if (val) {
No, blank line should divide the definitions and code, and should not be in
semantically coupled places.
...
Again, no need to resend, but keep in mind if you need a v8, this and other
comments needs to be addressed.
--
With Best Regards,
Andy Shevchenko