[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48a8dbb8-adf1-475e-897d-7369e2c3f6eb@web.de>
Date: Thu, 25 Sep 2025 17:07:21 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Gal Pressman <gal@...dia.com>, Tariq Toukan <tariqt@...dia.com>,
cocci@...ia.fr, Alexei Lazar <alazar@...dia.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Julia Lawall <Julia.Lawall@...ia.fr>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, Leon Romanovsky <leon@...nel.org>,
Mark Bloch <mbloch@...dia.com>, Nicolas Palix <nicolas.palix@...g.fr>,
Richard Cochran <richardcochran@...il.com>,
Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [cocci] [PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR()
to %pe candidates
…> 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?
> +@...ipt: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
Powered by blists - more mailing lists