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 <[email protected]>
Cc: Nicolas Palix <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Add space in front of the offending parentheses to silent the
parse error for older Coccinelle versions. This makes the rule
usable with all Coccinelle versions.
Reported-by: Nishanth Menon <[email protected]>
Signed-off-by: Vaishali Thakkar <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Fixes: c5eda8fd10 ("Coccinelle: Add api/setup_timer.cocci")
Signed-off-by: Michal Marek <[email protected]>
Use the timer API function setup_timer instead of structure field
assignments to initialize a timer.
Signed-off-by: Vaishali Thakkar <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Michal Marek <[email protected]>