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

From: Mika Westerberg
Date: Tue Nov 18 2025 - 00:34:24 EST


On Mon, Nov 17, 2025 at 06:06:16PM +0200, Andy Shevchenko wrote:
> On Mon, Nov 17, 2025 at 1:27 PM Mika Westerberg
> <mika.westerberg@xxxxxxxxxxxxxxx> wrote:
> > On Mon, Nov 17, 2025 at 08:56:59AM +0100, Andy Shevchenko wrote:
>
> ...
>
> > > struct intel_pinctrl *pctrl = gpiochip_get_data(gc);
> > > + struct device *dev = pctrl->dev;
> >
> > I prefer this keeping the reverse christmas tree.
>
> And I prefer the logical split, if possible. putting it in between the
> intel_community and intel_paggroup lines seems worse to me than the
> proposed case.
>
> > Also it can be const.
>
> True, and it makes things closer to what you want if I leave it on the
> same line. Do you agree with my reasoning?

As long as it keeps the reverse chrismas tree after you add const.

>
> > > const struct intel_community *community;
> > > const struct intel_padgroup *grp;
> > > int ret;
>
> --
> With Best Regards,
> Andy Shevchenko