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 | 1046 | return DBG_PASS_EVENT; |
| 1047 | 1047 | } |
| 1048 | 1048 | #endif |
| 1049 | − /* Fall through */ | |
| 1049 | + fallthrough; | |
| 1050 | 1050 | case 'C': /* Exception passing */ |
| 1051 | 1051 | tmp = gdb_cmd_exception_pass(ks); |
| 1052 | 1052 | if (tmp > 0) |
| 1053 | 1053 | goto default_handle; |
| 1054 | 1054 | if (tmp == 0) |
| 1055 | 1055 | break; |
| 1056 | − /* Fall through - on tmp < 0 */ | |
| 1056 | + fallthrough; /* on tmp < 0 */ | |
| 1057 | 1057 | case 'c': /* Continue packet */ |
| 1058 | 1058 | case 's': /* Single step packet */ |
| 1059 | 1059 | if (kgdb_contthread && kgdb_contthread != current) { |
| @@ -1062,7 +1062,7 @@ int gdb_serial_stub(struct kgdb_state *ks) · 2 unmodified lines | ||
| 1062 | 1062 | break; |
| 1063 | 1063 | } |
| 1064 | 1064 | dbg_activate_sw_breakpoints(); |
| 1065 | − /* Fall through - to default processing */ | |
| 1065 | + fallthrough; /* to default processing */ | |
| 1066 | 1066 | default: |
| 1067 | 1067 | default_handle: |
| 1068 | 1068 | error = kgdb_arch_handle_exception(ks->ex_vector, |
| @@ -173,11 +173,11 @@ int kdb_get_kbd_char(void) · 172 unmodified lines | ||
| 173 | 173 | case KT_LATIN: |
| 174 | 174 | if (isprint(keychar)) |
| 175 | 175 | break; /* printable characters */ |
| 176 | − /* fall through */ | |
| 176 | + fallthrough; | |
| 177 | 177 | case KT_SPEC: |
| 178 | 178 | if (keychar == K_ENTER) |
| 179 | 179 | break; |
| 180 | − /* fall through */ | |
| 180 | + fallthrough; | |
| 181 | 181 | default: |
| 182 | 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 | 432 | *word = w8; |
| 433 | 433 | break; |
| 434 | 434 | } |
| 435 | − /* fall through */ | |
| 435 | + fallthrough; | |
| 436 | 436 | default: |
| 437 | 437 | diag = KDB_BADWIDTH; |
| 438 | 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 | 481 | *word = w8; |
| 482 | 482 | break; |
| 483 | 483 | } |
| 484 | − /* fall through */ | |
| 484 | + fallthrough; | |
| 485 | 485 | default: |
| 486 | 486 | diag = KDB_BADWIDTH; |
| 487 | 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 | 525 | diag = kdb_putarea(addr, w8); |
| 526 | 526 | break; |
| 527 | 527 | } |
| 528 | − /* fall through */ | |
| 528 | + fallthrough; | |
| 529 | 529 | default: |
| 530 | 530 | diag = KDB_BADWIDTH; |
| 531 | 531 | kdb_printf("kdb_putword: bad width %ld\n", (long) size); |