Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Showing the changes to kernel/debug (3 of 1148 files). Show all
Unified · Split
| @@ -1046,14 +1046,14 @@ int gdb_serial_stub(struct kgdb_state *ks) · 1045 unmodified lines | |||
| 1046 | return DBG_PASS_EVENT; | 1046 | return DBG_PASS_EVENT; |
| 1047 | } | 1047 | } |
| 1048 | #endif | 1048 | #endif |
| 1049 | /* Fall through */ | 1049 | fallthrough; |
| 1050 | case 'C': /* Exception passing */ | 1050 | case 'C': /* Exception passing */ |
| 1051 | tmp = gdb_cmd_exception_pass(ks); | 1051 | tmp = gdb_cmd_exception_pass(ks); |
| 1052 | if (tmp > 0) | 1052 | if (tmp > 0) |
| 1053 | goto default_handle; | 1053 | goto default_handle; |
| 1054 | if (tmp == 0) | 1054 | if (tmp == 0) |
| 1055 | break; | 1055 | break; |
| 1056 | /* Fall through - on tmp < 0 */ | 1056 | fallthrough; /* on tmp < 0 */ |
| 1057 | case 'c': /* Continue packet */ | 1057 | case 'c': /* Continue packet */ |
| 1058 | case 's': /* Single step packet */ | 1058 | case 's': /* Single step packet */ |
| 1059 | if (kgdb_contthread && kgdb_contthread != current) { | 1059 | if (kgdb_contthread && kgdb_contthread != current) { |
| @@ -1062,7 +1062,7 @@ int gdb_serial_stub(struct kgdb_state *ks) · 2 unmodified lines | |||
| 1062 | break; | 1062 | break; |
| 1063 | } | 1063 | } |
| 1064 | dbg_activate_sw_breakpoints(); | 1064 | dbg_activate_sw_breakpoints(); |
| 1065 | /* Fall through - to default processing */ | 1065 | fallthrough; /* to default processing */ |
| 1066 | default: | 1066 | default: |
| 1067 | default_handle: | 1067 | default_handle: |
| 1068 | error = kgdb_arch_handle_exception(ks->ex_vector, | 1068 | error = kgdb_arch_handle_exception(ks->ex_vector, |
| @@ -173,11 +173,11 @@ int kdb_get_kbd_char(void) · 172 unmodified lines | |||
| 173 | case KT_LATIN: | 173 | case KT_LATIN: |
| 174 | if (isprint(keychar)) | 174 | if (isprint(keychar)) |
| 175 | break; /* printable characters */ | 175 | break; /* printable characters */ |
| 176 | /* fall through */ | 176 | fallthrough; |
| 177 | case KT_SPEC: | 177 | case KT_SPEC: |
| 178 | if (keychar == K_ENTER) | 178 | if (keychar == K_ENTER) |
| 179 | break; | 179 | break; |
| 180 | /* fall through */ | 180 | fallthrough; |
| 181 | default: | 181 | default: |
| 182 | return -1; /* ignore unprintables */ | 182 | return -1; /* ignore unprintables */ |
| 183 | } | 183 | } |
| @@ -432,7 +432,7 @@ int kdb_getphysword(unsigned long *word, unsigned long addr, size_t size) · 431 unmodified lines | |||
| 432 | *word = w8; | 432 | *word = w8; |
| 433 | break; | 433 | break; |
| 434 | } | 434 | } |
| 435 | /* fall through */ | 435 | fallthrough; |
| 436 | default: | 436 | default: |
| 437 | diag = KDB_BADWIDTH; | 437 | diag = KDB_BADWIDTH; |
| 438 | kdb_printf("kdb_getphysword: bad width %ld\n", (long) size); | 438 | kdb_printf("kdb_getphysword: bad width %ld\n", (long) size); |
| @@ -481,7 +481,7 @@ int kdb_getword(unsigned long *word, unsigned long addr, size_t size) · 42 unmodified lines | |||
| 481 | *word = w8; | 481 | *word = w8; |
| 482 | break; | 482 | break; |
| 483 | } | 483 | } |
| 484 | /* fall through */ | 484 | fallthrough; |
| 485 | default: | 485 | default: |
| 486 | diag = KDB_BADWIDTH; | 486 | diag = KDB_BADWIDTH; |
| 487 | kdb_printf("kdb_getword: bad width %ld\n", (long) size); | 487 | kdb_printf("kdb_getword: bad width %ld\n", (long) size); |
| @@ -525,7 +525,7 @@ int kdb_putword(unsigned long addr, unsigned long word, size_t size) · 37 unmodified lines | |||
| 525 | diag = kdb_putarea(addr, w8); | 525 | diag = kdb_putarea(addr, w8); |
| 526 | break; | 526 | break; |
| 527 | } | 527 | } |
| 528 | /* fall through */ | 528 | fallthrough; |
| 529 | default: | 529 | default: |
| 530 | diag = KDB_BADWIDTH; | 530 | diag = KDB_BADWIDTH; |
| 531 | kdb_printf("kdb_putword: bad width %ld\n", (long) size); | 531 | kdb_printf("kdb_putword: bad width %ld\n", (long) size); |