[cocci] [PATCH v4 1/5] coccinelle: misc: Add field_modify script
Luo Jie
quic_luoj at quicinc.com
Mon Jun 16 03:28:25 PDT 2025
On 6/13/2025 12:48 AM, Markus Elfring wrote:
> …
>> ---
>> scripts/coccinelle/misc/field_modify.cocci | 61 ++++++++++++++++++++++++++++++
> …
>
> Did you overlook the addition of patch version descriptions?
> https://lore.kernel.org/all/?q=%22This+looks+like+a+new+version+of+a+previously+submitted+patch%22
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.15#n310
Thank you for highlighting this, and for the references. A brief
description of the differences in this script patch compared to
the previous (v3) version were included in the cover letter, so
a changelog was not added to the individual patch's commit message.
Hope this approach is acceptable.
I will ensure to include the reviewer in the CC list for future
submissions, as recommended in the documentation.
>
>
> …
>> +@ depends on context && !patch && !org && !report@
> …
>
> I imagine that the condition selections can be simplified.
>
I agree that the condition selections can be simplified, I will
update it to "@ depends on context@". Hope it is fine.
>
> …
>> + at script:python depends on report@
>> +p << r.p;
>> +x << r.reg;
>> +@@
>> +
>> +msg="WARNING: Consider using FIELD_MODIFY helper on %s" % (x)
>> +coccilib.report.print_report(p[0], msg)
> Do you know that a string construction can also be directly passed
> to such a function call?
I appreciate the tip. I'll update the patch to pass the formatted
string directly to the function call in the next revision.
>
> Regards,
> Markus
More information about the linux-arm-kernel
mailing list