Commit cdb2d3e
arm64: KVM: hyp: debug-sr: Mark expected switch fall-through
When fall-through warnings was enabled by default the following warnings
was starting to show up:
../arch/arm64/kvm/hyp/debug-sr.c: In function ‘__debug_save_state’:
../arch/arm64/kvm/hyp/debug-sr.c:20:19: warning: this statement may fall
through [-Wimplicit-fallthrough=]
case 15: ptr[15] = read_debug(reg, 15); \
../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’
save_debug(dbg->dbg_bcr, dbgbcr, brps);
^~~~~~~~~~
../arch/arm64/kvm/hyp/debug-sr.c:21:2: note: here
case 14: ptr[14] = read_debug(reg, 14); \
^~~~
../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’
save_debug(dbg->dbg_bcr, dbgbcr, brps);
^~~~~~~~~~
../arch/arm64/kvm/hyp/debug-sr.c:21:19: warning: this statement may fall
through [-Wimplicit-fallthrough=]
case 14: ptr[14] = read_debug(reg, 14); \
../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’
save_debug(dbg->dbg_bcr, dbgbcr, brps);
^~~~~~~~~~
../arch/arm64/kvm/hyp/debug-sr.c:22:2: note: here
case 13: ptr[13] = read_debug(reg, 13); \
^~~~
../arch/arm64/kvm/hyp/debug-sr.c:113:2: note: in expansion of macro ‘save_debug’
save_debug(dbg->dbg_bcr, dbgbcr, brps);
^~~~~~~~~~
Rework to add a 'Fall through' comment where the compiler warned
about fall-through, hence silencing the warning.
Fixes: d93512e ("Makefile: Globally enable fall-through warning")
Signed-off-by: Anders Roxell <[email protected]>
[maz: fixed commit message]
Signed-off-by: Marc Zyngier <[email protected]>1 parent 6701c61 commit cdb2d3e
1 file changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
| 25 | + | |
23 | 26 | | |
| 27 | + | |
24 | 28 | | |
| 29 | + | |
25 | 30 | | |
| 31 | + | |
26 | 32 | | |
| 33 | + | |
27 | 34 | | |
| 35 | + | |
28 | 36 | | |
| 37 | + | |
29 | 38 | | |
| 39 | + | |
30 | 40 | | |
| 41 | + | |
31 | 42 | | |
| 43 | + | |
32 | 44 | | |
| 45 | + | |
33 | 46 | | |
| 47 | + | |
34 | 48 | | |
| 49 | + | |
35 | 50 | | |
36 | 51 | | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
| 56 | + | |
41 | 57 | | |
| 58 | + | |
42 | 59 | | |
| 60 | + | |
43 | 61 | | |
| 62 | + | |
44 | 63 | | |
| 64 | + | |
45 | 65 | | |
| 66 | + | |
46 | 67 | | |
| 68 | + | |
47 | 69 | | |
| 70 | + | |
48 | 71 | | |
| 72 | + | |
49 | 73 | | |
| 74 | + | |
50 | 75 | | |
| 76 | + | |
51 | 77 | | |
| 78 | + | |
52 | 79 | | |
| 80 | + | |
53 | 81 | | |
| 82 | + | |
54 | 83 | | |
| 84 | + | |
55 | 85 | | |
56 | 86 | | |
57 | 87 | | |
| |||
0 commit comments