linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ChiYuan Huang <u0084500@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	cy_huang <cy_huang@richtek.com>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/2] iio: adc: Add rtq6056 support
Date: Fri, 24 Jun 2022 11:39:06 +0800	[thread overview]
Message-ID: <CADiBU3_jgoc9ZuVuVH_cvSeQkghOeUDxzLE_VZFtZ9eaTWeqgA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VeBdgbyDQXEYb9ZZdi3AU=vPw6aKGWbNLnuA_QoN4LE4A@mail.gmail.com>

Andy Shevchenko <andy.shevchenko@gmail.com> 於 2022年6月19日 週日 下午6:38寫道:
>
> On Sat, Jun 18, 2022 at 5:16 PM ChiYuan Huang <u0084500@gmail.com> wrote:
> > Andy Shevchenko <andy.shevchenko@gmail.com> 於 2022年6月18日 週六 凌晨1:08寫道:
> > > On Fri, Jun 17, 2022 at 11:37 AM cy_huang <u0084500@gmail.com> wrote:
>
> ...
>
> > > > +KernelVersion: 5.18.2
> > >
> > > Wrong version, this won't be part of a stable kernel.
> > >
> > From kernel.org, currently the stable kernel version is 5.18.5.
> > Change to 5.18.5?
>
> Nope. You need to use realistic kernel version, and as I said it can't
> be a stable one.
>
> ...
>
> > > But for sure you missed
>
> > >   types.h
> > >
> > Ack in next. But for types.h, i2c.h already include device.h.
> > And device.h already include types.h.
> > Is it still needed to declare explicitly for types.h??
>
> Yes. You have to include all headers you are a direct user of, except
> the ones that are guaranteed to be included by others. The types.h is
> not guaranteed to be included by listed above.
>
> ...
>
> > > > +       struct device *dev;
> > > > +       struct regmap *regmap;
> > >
> > > Swapping these two might give less code in the generated binary. Have
> > > you run bloat-o-meter?
> > >
> > I never know about this tool.
> > I'll check it before I submit the next revision.
> > Thanks for the reminding.
> >
> > But from Jonathan's reply, I may remove 'struct regmap *regmap'.
> > If all function need the 'regmap', a local variable 'regmap' need to
> > be declared.
> > To use struct regmap *regmap = dev_get_regmap(dev, NULL) is more effective.
>
> It's fine, but you may experiment with bloat-o-meter even in that case
> out of curiosity.
>
I tred to only swap these two line for *dev and *regmap.
Check the below two cases
1. bloat-o-meter with rtq6056 as the builtin
add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0 (0)
Function                                     old     new   delta
Total: Before=24428680, After=24428680, chg +0.00%
2. size tool with rtq6056 as the kernel build
   text    data     bss     dec     hex filename
   5261    1155       0    6416    1910 drivers/iio/adc/rtq6056-adc.ko.old
   text    data     bss     dec     hex filename
   5261    1155       0    6416    1910 drivers/iio/adc/rtq6056-adc.ko

It's weird that there's no difference.

Do I misunderstand something?

> --
> With Best Regards,
> Andy Shevchenko

  reply	other threads:[~2022-06-24  3:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17  9:32 [PATCH 0/2] Add Richtek RTQ6056 support cy_huang
2022-06-17  9:32 ` [PATCH 1/2] dt-bindings: iio: adc: Add rtq6056 adc support cy_huang
2022-06-18  1:45   ` Krzysztof Kozlowski
2022-06-18 15:50     ` ChiYuan Huang
2022-06-18 17:00       ` Krzysztof Kozlowski
2022-06-18 17:34         ` Jonathan Cameron
2022-06-18 17:35           ` Jonathan Cameron
2022-06-19 10:26           ` Krzysztof Kozlowski
2022-06-17  9:32 ` [PATCH 2/2] iio: adc: Add rtq6056 support cy_huang
2022-06-17 17:07   ` Andy Shevchenko
2022-06-18 15:16     ` ChiYuan Huang
2022-06-19 10:38       ` Andy Shevchenko
2022-06-24  3:39         ` ChiYuan Huang [this message]
2022-06-28 11:47           ` Andy Shevchenko
2022-06-17 17:10   ` Jonathan Cameron
2022-06-18 15:49     ` ChiYuan Huang
2022-06-19 11:32       ` Jonathan Cameron

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=CADiBU3_jgoc9ZuVuVH_cvSeQkghOeUDxzLE_VZFtZ9eaTWeqgA@mail.gmail.com \
    --to=u0084500@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=cy_huang@richtek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).