Merge remote-tracking branch 'remotes/kraxel/tags/input-20210910-pull-request' into...
[qemu.git] / scripts / coccinelle / timer-del-timer-free.cocci
blobc3cfd42803943194ba07a5bb4d6d1f1b17a7e9a8
1 // Remove superfluous timer_del() calls
2 //
3 // Copyright Linaro Limited 2020
4 // This work is licensed under the terms of the GNU GPLv2 or later.
5 //
6 // spatch --macro-file scripts/cocci-macro-file.h \
7 //        --sp-file scripts/coccinelle/timer-del-timer-free.cocci \
8 //        --in-place --dir .
9 //
10 // The timer_free() function now implicitly calls timer_del()
11 // for you, so calls to timer_del() immediately before the
12 // timer_free() of the same timer can be deleted.
15 expression T;
17 -timer_del(T);
18  timer_free(T);