mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: ChiYuan Huang <u0084500@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: Tue, 28 Jun 2022 13:47:15 +0200	[thread overview]
Message-ID: <CAHp75VejsNhgee0exMGzo3dqFxi8udO2GUbCTz9iNFJ7wZGvRw@mail.gmail.com> (raw)
In-Reply-To: <CADiBU3_jgoc9ZuVuVH_cvSeQkghOeUDxzLE_VZFtZ9eaTWeqgA@mail.gmail.com>

On Fri, Jun 24, 2022 at 5:39 AM ChiYuan Huang <u0084500@gmail.com> wrote:
> 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:

...

> > > > > +       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?

Nope, it means that in _current_ code this makes no change. Feel free
to go with your variant if you prefer.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2022-06-28 11:48 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
2022-06-28 11:47           ` Andy Shevchenko [this message]
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=CAHp75VejsNhgee0exMGzo3dqFxi8udO2GUbCTz9iNFJ7wZGvRw@mail.gmail.com \
    --to=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 \
    --cc=u0084500@gmail.com \
    /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

all inboxes | Powered by JetHome®