aboutsummaryrefslogtreecommitdiff
path: root/scripts/coccinelle/cpu_restore_state.cocci
blob: 61bc749d14a67e341d82e98b8a233fc11306aea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Remove unneeded tests before calling cpu_restore_state
//
// spatch --macro-file scripts/cocci-macro-file.h \
//        --sp-file ./scripts/coccinelle/cpu_restore_state.cocci \
//        --keep-comments --in-place --use-gitgrep --dir target
@@
expression A;
expression C;
@@
-if (A) {
     cpu_restore_state(C, A);
-}
@@
expression A;
expression C;
@@
- cpu_restore_state(C, A);
- cpu_loop_exit(C);
+ cpu_loop_exit_restore(C, A);