Re: [PATCH v2 1/2] gpio: tegra186: Simplify GPIO line name prefix handling
From: Bartosz Golaszewski
Date: Tue Feb 17 2026 - 09:07:27 EST
On Tue, Feb 17, 2026 at 2:29 PM Jon Hunter <jonathanh@xxxxxxxxxx> wrote:
>
> >
> > I'm perfectly fine with patch 2/2 but this one is giving me a hard time. What
> > are we really gaining other than some questionable obfuscation? Keeping the
> > dash in the format string makes more sense to me and if we ever reuse the
> > prefix, we'll need to remember about it trimming it. I would drop this patch
> > and keep just 2/2.
>
> What we are gaining is by adding the '-' to the prefix directly in the
> tegra_gpio_soc structure, is that we no longer need the if-else clause
> in the code to add the dash if the prefix is valid. And this allows us
> to use the ternary operator instead.
>
> If we drop this patch, then after patch 2/2, we will end up with nested
> if-else clauses to handle the prefix and multi-socket cases.
>
I see. Ok, will pick this up after v7.0-rc1.
Bart