[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b411c283-9430-4949-a6ee-bb8ea9febcaf@web.de>
Date: Tue, 30 Sep 2025 19:37:05 +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: [PATCH 3/6] Coccinelle: ptr_err_to_pe: Restrict the metavariable type “constant” for the usage of string literals
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 30 Sep 2025 17:28:20 +0200
Refine the metavariable type “constant” with “char[]” so that only
string literals should be found for the desired source code search.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
See also:
[PATCH net-next 1/2] scripts/coccinelle: Find PTR_ERR() to %pe candidates
https://lore.kernel.org/cocci/6b2eb2c2-15e7-49b4-aaca-6fd58af9ec6c@nvidia.com/
scripts/coccinelle/misc/ptr_err_to_pe.cocci | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/coccinelle/misc/ptr_err_to_pe.cocci b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
index 26888d2c9c83..fb4b5bf91081 100644
--- a/scripts/coccinelle/misc/ptr_err_to_pe.cocci
+++ b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
@@ -14,7 +14,7 @@ virtual context, report, org
@r@
expression ptr;
-constant fmt;
+constant char[] fmt;
position p;
identifier print_func;
@@
--
2.51.0
Powered by blists - more mailing lists