Re: [PATCH v2 2/2] iio: adc: hx711: add support for HX710B
From: Andy Shevchenko
Date: Wed Apr 22 2026 - 04:42:04 EST
On Wed, Apr 22, 2026 at 11:19:15AM +0530, Piyush Patle wrote:
> On Mon, Apr 20, 2026 at 2:33 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxx> wrote:
> > On Sun, Apr 19, 2026 at 11:16:40PM +0530, Piyush Patle wrote:
...
> > > +struct hx711_chip_info {
> > > + const char *name;
> > > + const struct iio_chan_spec *channels;
> > > + int num_channels;
> >
> > Why signed?
>
> num_channels cannot be negative, so unsigned int is
> more appropriate. The same applies to fixed_gain_val. Will fix both.
Thanks for pointing on that, now I see one more thing: please, run `pahole`
and check if the layout is optimised (to me sounds like it has unneeded memory
gaps).
> > > + const struct iio_info *iio_info;
> > > + bool fixed_gain;
> > > + int fixed_gain_val;
> > > +};
--
With Best Regards,
Andy Shevchenko