Re: [PATCH v1 4/5] pinctrl: intel: Refactor intel_gpio_add_pin_ranges() to make it shorter

From: Mika Westerberg

Date: Thu Mar 19 2026 - 03:07:42 EST


On Thu, Mar 19, 2026 at 08:56:04AM +0200, Andy Shevchenko wrote:
> On Thu, Mar 19, 2026 at 07:03:45AM +0100, Mika Westerberg wrote:
> > On Wed, Mar 18, 2026 at 04:10:18PM +0100, Andy Shevchenko wrote:
> > > Refactor intel_gpio_add_pin_ranges() to make it shorter in binary
> > > and source formats.
> > >
> > > Function old new delta
> > > intel_gpio_add_pin_ranges 219 215 -4
> > > Total: Before=15522, After=15518, chg -0.03%
> >
> > Well if you enable optimization the compiler probably puts this into
> > register and you don't see any changes here.
>
> What do you mean? I do not alter what kernel uses.

Enable -Ox and compare then. I think there is Kconfig option for that too.

> > Also code-wise this is neglible IMHO.
>
> Maybe, but still good to have also shorter in source as well — we have
> -1 LoC at the end of the day.

Well this is silly. Your other patch adds "unsigned " to every other place
growing the driver "horizonally" but that's okay.