summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/exec_rw_const.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccinelle/exec_rw_const.cocci')
-rw-r--r--scripts/coccinelle/exec_rw_const.cocci12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/coccinelle/exec_rw_const.cocci b/scripts/coccinelle/exec_rw_const.cocci
index 9c14165fc0..493d79cd13 100644
--- a/scripts/coccinelle/exec_rw_const.cocci
+++ b/scripts/coccinelle/exec_rw_const.cocci
@@ -9,6 +9,18 @@
--dir .
*/
+// Convert to boolean
+@@
+expression E1, E2, E3, E4, E5;
+@@
+(
+- address_space_rw(E1, E2, E3, E4, E5, 0)
++ address_space_rw(E1, E2, E3, E4, E5, false)
+|
+- address_space_rw(E1, E2, E3, E4, E5, 1)
++ address_space_rw(E1, E2, E3, E4, E5, true)
+)
+
// Use address_space_write instead of casting to non-const
@@
type T;