]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
coccinelle: Improve setup_timer.cocci matching
authorKees Cook <keescook@chromium.org>
Wed, 20 Sep 2017 23:27:25 +0000 (16:27 -0700)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 14 Nov 2017 14:19:03 +0000 (23:19 +0900)
commit1b18d05c7c204a59e0ac66cbfa813a7173c4426e
tree61566a79f4428305e3aa7feb453bb9713edf8ff9
parentbc27b77df1939b9567aa468c47d4a5784f40cfa1
coccinelle: Improve setup_timer.cocci matching

This improves the patch mode of setup_timer.cocci. Several patterns
were missing:
 - assignments-before-init_timer() cases
 - limit the .data case removal to the specific struct timer_list instance
 - handling calls by dereference (timer->field vs timer.field)

Cc: Gilles Muller <Gilles.Muller@lip6.fr>
Cc: Nicolas Palix <nicolas.palix@imag.fr>
Cc: Michal Marek <mmarek@suse.com>
Cc: cocci@systeme.lip6.fr
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/coccinelle/api/setup_timer.cocci