unlock_return.cocci: Add a check for ACPI_SERIAL_{BEGIN,END}.
authorSascha Wildner <saw@online.de>
Sat, 28 Jun 2014 12:00:58 +0000 (14:00 +0200)
committerSascha Wildner <saw@online.de>
Sat, 28 Jun 2014 12:00:58 +0000 (14:00 +0200)
test/cocci/unlock_return.cocci

index 45f9495..ecc380a 100644 (file)
 //   (indefinitely?) on some files.
 //
 
+// ACPI_SERIAL_BEGIN(...) / ACPI_SERIAL_END(...)
+//
+@rcu_ACPI_SERIAL_BEGIN exists@
+position p1;
+expression E;
+@@
+
+ACPI_SERIAL_BEGIN@p1(E);
+...
+ACPI_SERIAL_END(E);
+
+@exists@
+position rcu_ACPI_SERIAL_BEGIN.p1;
+expression E;
+@@
+
+*ACPI_SERIAL_BEGIN@p1(E);
+... when != ACPI_SERIAL_END(E);
+?*return ...;
+
 // crit_enter() / crit_exit()
 //
 @rcu_crit_enter exists@