public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Piyush Patle <piyushpatle228@gmail.com>
Cc: jic23@kernel.org, ak@it-klinger.de, dlechner@baylibre.com,
	nuno.sa@analog.com, andy@kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: hx711: add support for HX710B
Date: Wed, 22 Apr 2026 11:38:28 +0300	[thread overview]
Message-ID: <aeiJBMjI0Frs3h26@ashevche-desk.local> (raw)
In-Reply-To: <CAMB+xka2ZXbT-G-RUMAusJm8KsOjpCVwjijG2eUaPxBYahQrgg@mail.gmail.com>

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@intel.com> 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



  reply	other threads:[~2026-04-22  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 17:46 [PATCH v2 0/2] iio: adc: hx711: add HX710B support Piyush Patle
2026-04-19 17:46 ` [PATCH v2 1/2] dt-bindings: iio: adc: avia-hx711: add avia,hx710b compatible Piyush Patle
2026-04-21  8:23   ` Krzysztof Kozlowski
2026-04-22  6:02     ` Piyush Patle
2026-04-24 12:21       ` Jonathan Cameron
2026-04-19 17:46 ` [PATCH v2 2/2] iio: adc: hx711: add support for HX710B Piyush Patle
2026-04-20  9:03   ` Andy Shevchenko
2026-04-22  5:49     ` Piyush Patle
2026-04-22  8:38       ` Andy Shevchenko [this message]
2026-04-21 15:17   ` Jonathan Cameron
2026-04-22  5:21     ` Piyush Patle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aeiJBMjI0Frs3h26@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=ak@it-klinger.de \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=piyushpatle228@gmail.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox