lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] iio: adc: Add rtq6056 support
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

\
 
 \ /
  Last update: 2022-06-28 13:48    [W:0.047 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site