Re: [PATCH v2] w1: Replace usage of found with dedicated list iterator variable

From: Jakob Koschel
Date: Fri May 12 2023 - 07:28:38 EST


On 23/05/12 01:23PM, Krzysztof Kozlowski wrote:
> On 12/05/2023 13:17, Jakob Koschel wrote:
> > On 23/05/12 12:26PM, Krzysztof Kozlowski wrote:
> >> On 12/05/2023 12:19, Jakob Koschel wrote:
> >>> How strange, I just checked and my checkpatch doesn't complain.
> >>>
> >>> I also redownloaded and double checked
> >>> (b4 am 20230509-w1-replace-usage-of-found-with-tmp-list-iterator-variable-v2-1-259bf1ba44ed@xxxxxxxxx).
> >>>
> >>> What's the exact issue you are seeing?
> >>
> >> ✓ [PATCH v2] w1: Replace usage of found with dedicated list iterator
> >> variable
> >> + Link:
> >> https://lore.kernel.org/r/20230509-w1-replace-usage-of-found-with-tmp-list-iterator-variable-v2-1-259bf1ba44ed@xxxxxxxxx
> >> + Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> >> ---
> >> ✗ No key: ed25519/jkl820.git@xxxxxxxxx
> >> ✓ Signed: DKIM/gmail.com
> >> ---
> >> Total patches: 1
> >> ---
> >> Base: using specified base-commit eeac8ede17557680855031c6f305ece2378af326
> >> Applying: w1: Replace usage of found with dedicated list iterator variable
> >> [Checking commit] 12b61e664c29 w1: Replace usage of found with
> >> dedicated list iterator variable
> >> [Checkpatch]
> >> CHECK: Alignment should match open parenthesis
> >> #70: FILE: drivers/w1/w1.c:849:
> >> + if (iter->reg_num.family == id->family &&
> >> + iter->reg_num.id == id->id &&
> >
> > I tried a bunch of things but I can't see this message. I tried with 'checkpatch.pl' from different kernel commits.
> >
> > I did:
> >
> > b4 am 20230509-w1-replace-usage-of-found-with-tmp-list-iterator-variable-v2-1-259bf1ba44ed@xxxxxxxxx
> > scripts/checkpatch.pl ./v2_20230510_jkl820_git_w1_replace_usage_of_found_with_dedicated_list_iterator_variable.mbx
> >
> > and always get:
> >
> > total: 0 errors, 0 warnings, 64 lines checked
> >
> > ./v2_20230510_jkl820_git_w1_replace_usage_of_found_with_dedicated_list_iterator_variable.mbx has no obvious style problems and is ready for submission.
> >
>
> First - the missing indentation is visible with bare eyes, you can also
> fix it without checking in checkpatch.

Ah the original code was already wrong and I just kept that way.
Since I'm not frequently contributing and didn't have an error to work with I also didn't know what the correct
way should be.

>
> It seems you are not running checkpatch with --strict. If you want to
> see the exact error - run with strict.

Thanks, I wasn't aware there is a strict version I should be using.
Good to know for the future.

Not that I can reproduce, I'll fix and send send v3. Sorry about the mess.

>
> Best regards,
> Krzysztof
>