linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-gpio@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Andy Shevchenko <andy@kernel.org>,
	 Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v1 1/3] pinctrl: intel: Refactor intel_gpio_add_pin_ranges() to make it shorter
Date: Tue, 18 Nov 2025 12:02:34 +0200	[thread overview]
Message-ID: <CAHp75VchSE38aw39eDmeZQi1RTQ-nESf-MsOKAhsFe0xOSsTWQ@mail.gmail.com> (raw)
In-Reply-To: <20251118052731.GC2912318@black.igk.intel.com>

On Tue, Nov 18, 2025 at 7:27 AM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> 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@linux.intel.com> 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.

So, it means "no" then?
Let me try again. The current looking is this:

> > > >       const struct intel_community *community;
> > > >       const struct intel_padgroup *grp;
> > > >       int ret;


After what you are so insisting it will be like

       const struct intel_community *community;
       const struct device *dev = pctrl->dev;
       const struct intel_padgroup *grp;
       int ret;

which disrupts the established grouping of the Intel pin control
related definitions. And in all other functions where two definitions
appear they are never interleaved with other definitions. And I would
like to keep it that way. So, with my proposal it will be like

       const struct device *dev = pctrl->dev;
       const struct intel_community *community;
       const struct intel_padgroup *grp;
       int ret;

or like

       const struct intel_community *community;
       const struct intel_padgroup *grp;
       const struct device *dev = pctrl->dev;
       int ret;

which is not strictly reversed order (but the upper one is close
enough, like a couple of characters shorter than "required").

If you are still insisting on the strict xmas tree reversed order,
assume I drop this change because I reasoned why I want the way I put
it, can you review the rest of the series, please?

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2025-11-18 10:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17  7:56 [PATCH v1 0/3] pinctrl: intel: Export intel_gpio_add_pin_ranges() and use it Andy Shevchenko
2025-11-17  7:56 ` [PATCH v1 1/3] pinctrl: intel: Refactor intel_gpio_add_pin_ranges() to make it shorter Andy Shevchenko
2025-11-17 11:27   ` Mika Westerberg
2025-11-17 16:06     ` Andy Shevchenko
2025-11-18  5:27       ` Mika Westerberg
2025-11-18 10:02         ` Andy Shevchenko [this message]
2025-11-17  7:57 ` [PATCH v1 2/3] pinctrl: intel: Export intel_gpio_add_pin_ranges() Andy Shevchenko
2025-11-18 11:47   ` Mika Westerberg
2025-11-18 12:04     ` Andy Shevchenko
2025-11-17  7:57 ` [PATCH v1 3/3] pinctrl: cherryview: Convert to use intel_gpio_add_pin_ranges() Andy Shevchenko
2025-11-18 11:47   ` Mika Westerberg

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=CAHp75VchSE38aw39eDmeZQi1RTQ-nESf-MsOKAhsFe0xOSsTWQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).