From: Markus Elfring <Markus.Elfring@web.de>
To: Gal Pressman <gal@nvidia.com>, Tariq Toukan <tariqt@nvidia.com>,
cocci@inria.fr, Alexei Lazar <alazar@nvidia.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Julia Lawall <Julia.Lawall@inria.fr>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
Leon Romanovsky <leon@kernel.org>, Mark Bloch <mbloch@nvidia.com>,
Nicolas Palix <nicolas.palix@imag.fr>,
Richard Cochran <richardcochran@gmail.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
Date: Thu, 25 Sep 2025 17:07:21 +0200 [thread overview]
Message-ID: <48a8dbb8-adf1-475e-897d-7369e2c3f6eb@web.de> (raw)
In-Reply-To: <1758192227-701925-2-git-send-email-tariqt@nvidia.com>
…> The script supports context, report, and org modes.
I suggest to omit this sentence from the description.
Will the hint “scripts/” be omitted from the patch prefix?
…> +++ b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
…> +// URL: https://coccinelle.gitlabpages.inria.fr/website
I suggest to omit this comment line.
…> +virtual context
> +virtual org
> +virtual report
The restriction on the support for three operation modes will need further development considerations.
> +@r@
> +expression ptr;
> +constant fmt;
> +position p;
> +identifier print_func;
> +@@
> +* print_func(..., fmt, ..., PTR_ERR@p(ptr), ...)
How do you think about to use the metavariable type “format list”?
Would it matter to restrict expressions to pointer expressions?
> +@script:python depends on r && org@
I guess that such an SmPL dependency specification can be simplified a bit.
> +p << r.p;
> +@@
> +coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
I suggest to reconsider the implementation detail once more
if the SmPL asterisk functionality fits really to the operation modes “org” and “report”.
The operation mode “context” can usually work also without an extra position variable,
can't it?
Regards,
Markus
next prev parent reply other threads:[~2025-09-25 15:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 10:43 [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script Tariq Toukan
2025-09-18 10:43 ` [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates Tariq Toukan
2025-09-19 16:54 ` Simon Horman
2025-09-22 23:36 ` Jakub Kicinski
2025-09-25 15:07 ` Markus Elfring [this message]
2025-09-28 11:40 ` [cocci] " Gal Pressman
2025-09-28 12:00 ` Markus Elfring
2025-09-28 13:24 ` Gal Pressman
2025-09-28 14:16 ` Markus Elfring
2025-09-28 16:40 ` Gal Pressman
2025-09-28 17:51 ` [cocci] [1/2] " Markus Elfring
2025-09-28 12:23 ` [cocci] [PATCH net-next 1/2] " Julia Lawall
2025-09-28 13:17 ` Gal Pressman
2025-09-18 10:43 ` [PATCH net-next 2/2] net/mlx5: Use %pe format specifier for error pointers Tariq Toukan
2025-09-19 16:55 ` Simon Horman
2025-09-26 19:50 ` [PATCH net-next 0/2] scripts/coccinelle: Symbolic error names script patchwork-bot+netdevbpf
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=48a8dbb8-adf1-475e-897d-7369e2c3f6eb@web.de \
--to=markus.elfring@web.de \
--cc=Julia.Lawall@inria.fr \
--cc=alazar@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=cocci@inria.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.palix@imag.fr \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
/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