From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jacky Huang <ychuang3@nuvoton.com>,
Shan-Chun Hung <schung@nuvoton.com>,
Linus Walleij <linus.walleij@linaro.org>,
Steam Lin <stlin2@winbond.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-arm-kernel@lists.infradead.org,
linux-gpio@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] pinctrl: nuvoton: Fix boot on ma35dx platforms
Date: Mon, 16 Jun 2025 10:51:42 +0200 [thread overview]
Message-ID: <87tt4gnk69.fsf@bootlin.com> (raw)
In-Reply-To: <CAHp75VcfaU41FV-uN=82GdUqRadxYc6XaLX2Hr9x-4RfAV8CEg@mail.gmail.com> (Andy Shevchenko's message of "Sat, 14 Jun 2025 00:07:51 +0300")
Hi Andy,
On 14/06/2025 at 00:07:51 +03, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Fri, Jun 13, 2025 at 9:13 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>>
>> As part of a wider cleanup trying to get rid of OF specific APIs, an
>> incorrect (and partially unrelated) cleanup was introduced.
>>
>> The goal was to replace a device_for_each_chil_node() loop including an
>> additional condition inside by a macro doing both the loop and the
>> check on a single line.
>>
>> The snippet:
>>
>> device_for_each_child_node(dev, child)
>> if (fwnode_property_present(child, "gpio-controller"))
>> continue;
>>
>> was replaced by:
>>
>> for_each_gpiochip_node(dev, child)
>>
>> which expands into:
>>
>> device_for_each_child_node(dev, child)
>> for_each_if(fwnode_property_present(child, "gpio-controller"))
>>
>> This change is actually doing the opposite of what was initially
>> expected, breaking the probe of this driver, breaking at the same time
>> the whole boot of Nuvoton platforms (no more console, the kernel WARN()).
>>
>> Revert these two changes to roll back to the correct behavior.
>
> Thank you for the report and the fix.
> Can we also add a comment on top of each of these if:s to prevent from
> blind change in the future?
I believe it's fine like that, The difference is subtle, it is okay and
unavoidable to make this kind of small mistake sometimes.
Cheers,
Miquèl
next prev parent reply other threads:[~2025-06-16 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 18:13 [PATCH] pinctrl: nuvoton: Fix boot on ma35dx platforms Miquel Raynal
2025-06-13 21:07 ` Andy Shevchenko
2025-06-16 8:51 ` Miquel Raynal [this message]
2025-06-18 12:30 ` Linus Walleij
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=87tt4gnk69.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=andy.shevchenko@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=schung@nuvoton.com \
--cc=stable@vger.kernel.org \
--cc=stlin2@winbond.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=ychuang3@nuvoton.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.