Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Easwar Hariharan <eahariha@linux.microsoft.com>, cocci@inria.fr
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Julia Lawall <Julia.Lawall@inria.fr>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Ricardo Ribalda <ribalda@chromium.org>
Subject: Re: [cocci] [PATCH v?] coccinelle: misc: secs_to_jiffies: Implement context and report modes
Date: Thu, 12 Jun 2025 18:08:51 +0200	[thread overview]
Message-ID: <42bc5a8c-1b3d-46cf-a8d8-1b54ebf5ecbb@web.de> (raw)
In-Reply-To: <00e40c21-4797-41df-b082-318f474f76ae@linux.microsoft.com>

>> ---
>> 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

      parent reply	other threads:[~2025-06-12 16:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250610174521.12294-1-eahariha@linux.microsoft.com>
2025-06-10 17:49 ` [cocci] [PATCH] coccinelle: misc: secs_to_jiffies: Implement context and report modes Easwar Hariharan
2025-06-11  7:56   ` Ricardo Ribalda
2025-06-12 16:08   ` Markus Elfring [this message]

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=42bc5a8c-1b3d-46cf-a8d8-1b54ebf5ecbb@web.de \
    --to=markus.elfring@web.de \
    --cc=Julia.Lawall@inria.fr \
    --cc=akpm@linux-foundation.org \
    --cc=cocci@inria.fr \
    --cc=eahariha@linux.microsoft.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    --cc=ribalda@chromium.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).