[PATCH 5/6] Coccinelle: ptr_err_to_pe: Simplify two SmPL dependency specifications

Markus Elfring posted 6 patches 1 day, 3 hours ago
[PATCH 5/6] Coccinelle: ptr_err_to_pe: Simplify two SmPL dependency specifications
Posted by Markus Elfring 1 day, 3 hours ago
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 30 Sep 2025 17:46:55 +0200

Omit the explicit specification “r &&” from two SmPL rules
because the references are sufficient according to data declarations
for Python scripts.

Signed-off-by: Markus Elfring <elfring@users.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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/coccinelle/misc/ptr_err_to_pe.cocci b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
index b2db0dc3395e..f0bd658c7edb 100644
--- a/scripts/coccinelle/misc/ptr_err_to_pe.cocci
+++ b/scripts/coccinelle/misc/ptr_err_to_pe.cocci
@@ -20,12 +20,12 @@ identifier print_func;
 @@
 *print_func(..., fmt, ..., PTR_ERR@p(ptr), ...)
 
-@script:python depends on r && report@
+@script:python depends on report@
 p << r.p;
 @@
 coccilib.report.print_report(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
 
-@script:python depends on r && org@
+@script:python depends on org@
 p << r.p;
 @@
 coccilib.org.print_todo(p[0], "WARNING: Consider using %pe to print PTR_ERR()")
-- 
2.51.0