[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75VejsNhgee0exMGzo3dqFxi8udO2GUbCTz9iNFJ7wZGvRw@mail.gmail.com>
Date: Tue, 28 Jun 2022 13:47:15 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: ChiYuan Huang <u0084500@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Lars-Peter Clausen <lars@...afoo.de>,
cy_huang <cy_huang@...htek.com>,
linux-iio <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>
Subject: Re: [PATCH 2/2] iio: adc: Add rtq6056 support
On Fri, Jun 24, 2022 at 5:39 AM ChiYuan Huang <u0084500@...il.com> wrote:
> Andy Shevchenko <andy.shevchenko@...il.com> 於 2022年6月19日 週日 下午6:38寫道:
> > On Sat, Jun 18, 2022 at 5:16 PM ChiYuan Huang <u0084500@...il.com> wrote:
> > > Andy Shevchenko <andy.shevchenko@...il.com> 於 2022年6月18日 週六 凌晨1:08寫道:
> > > > On Fri, Jun 17, 2022 at 11:37 AM cy_huang <u0084500@...il.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
Powered by blists - more mailing lists