Re: [cocci] [PATCH v?] coccinelle: misc: secs_to_jiffies: Implement context and report modes

Markus Elfring
2025-06-12T16:09:03Z

>> ---
>> scripts/coccinelle/misc/secs_to_jiffies.cocci | 49 +++++++++++++++++--
…

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

Will any information from previous patch review approaches trigger more desirable effects
also for such an SmPL script variant?

>> -@depends on patch@ constant C; @@
>> +@pconst depends on patch@ constant C; @@
>>
>> - msecs_to_jiffies(C * 1000)
>> + secs_to_jiffies(C)
>>
>> -@depends on patch@ constant C; @@
>> +@pconstms depends on patch@ constant C; @@
>>
>> - msecs_to_jiffies(C * MSEC_PER_SEC)
>> + secs_to_jiffies(C)
>>
>> -@depends on patch@ expression E; @@
>> +@pexpr depends on patch@ expression E; @@
>>
>> - msecs_to_jiffies(E * 1000)
>> + secs_to_jiffies(E)
>>
>> -@depends on patch@ expression E; @@
>> +@pexprms depends on patch@ expression E; @@
>>
>> - msecs_to_jiffies(E * MSEC_PER_SEC)
>> + secs_to_jiffies(E)

Please reduce duplicate code for such SmPL rules.

>> +@r depends on report && !patch@
…

Please reconsider the condition selection once more.
SmPL code can probably be shared between the operation modes “orq” and “report”.
Would you get further development ideas from previous contributions?

Regards,
Markus