[PATCH 7/7] mtd: spi-nor: hisi-sfc: Simplify with scoped for each OF child loop

Pratyush Yadav pratyush at kernel.org
Sat Jan 3 15:28:48 PST 2026


(writing from my phone so please excuse the formatting)

On Sat, Jan 3, 2026, at 1:38 PM, Krzysztof Kozlowski wrote:
> On 02/01/2026 14:33, Pratyush Yadav wrote:
>> Hi Kyzystof,
>> 
>> Thanks for the cleanup.
>> 
>> On Fri, Jan 02 2026, Krzysztof Kozlowski wrote:
>> 
>>> Use scoped for-each loop when iterating over device nodes to make code a
>>> bit simpler.
>> 
>> Nit: the commit message is a bit too dry. I had to go and look what the
>> difference between the two variants was. I could make an educated guess
>> by looking at the patch, but still.
>
> Really? That's old and widely used syntax, replaced so many times and
> sorry, but really obvious.
>
> We should not explain core kernel API in commit msgs, except maybe first
> months of usage.

Dunno. It's the first time I'm seeing these. So this was my first reaction. I think the patch would read nicer if you explain why the new variant is better even if it is widely used.

Anyway, I don't want to waste either of our energy arguing this, so if you don't want to add the one liner, that's fine by me too.

>> 
>> If you end up doing a v2, a one-liner explanation of the difference
>> between the two loop variants would be nice to have.

-- 
Regards,
Pratyush Yadav



More information about the linux-mtd mailing list