Update Linux's cocci files
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 3 May 2018 18:18:40 +0000 (14:18 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 22 May 2018 21:53:04 +0000 (17:53 -0400)
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
scripts/spatch/linux/funcs.cocci
scripts/spatch/linux/memory.cocci

index 9afe806..01802f6 100644 (file)
@@ -122,6 +122,40 @@ expression lock, flags;
 +spin_unlock_irqsave(lock)
 
 @@
+typedef raw_spinlock_t;
+typedef spinlock_t;
+@@
+-raw_spinlock_t
++spinlock_t
+
+@@
+expression E;
+@@
+-raw_spin_lock_init(E)
++spinlock_init_irqsave(E)
+
+@@
+expression E;
+@@
+-raw_spin_lock(E)
++spin_lock_irqsave(E)
+
+@@
+expression E;
+@@
+-raw_spin_unlock(E)
++spin_unlock_irqsave(E)
+
+@@
+expression lock, flags;
+@@
+-raw_spin_lock_irqsave(lock, flags)
++spin_lock_irqsave(lock)
+...
+-raw_spin_unlock_irqrestore(lock, flags)
++spin_unlock_irqsave(lock)
+
+@@
 expression E;
 @@
 -ilog2(E)
index 54808f4..19d573e 100644 (file)
 
 @@
 @@
+-GFP_NOFS
++MEM_WAIT
+
+@@
+@@
 -__GFP_WAIT
 +MEM_WAIT