Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Use fallthrough pseudo-keyword

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

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200727224201.GA10133@embeddedor

authored by

Gustavo A. R. Silva and committed by
Michael Ellerman
5e66a0cb bf6b7661

+8 -8
+4 -4
arch/powerpc/kernel/align.c
··· 178 178 ret |= __get_user_inatomic(temp.v[1], p++); 179 179 ret |= __get_user_inatomic(temp.v[2], p++); 180 180 ret |= __get_user_inatomic(temp.v[3], p++); 181 - /* fall through */ 181 + fallthrough; 182 182 case 4: 183 183 ret |= __get_user_inatomic(temp.v[4], p++); 184 184 ret |= __get_user_inatomic(temp.v[5], p++); 185 - /* fall through */ 185 + fallthrough; 186 186 case 2: 187 187 ret |= __get_user_inatomic(temp.v[6], p++); 188 188 ret |= __get_user_inatomic(temp.v[7], p++); ··· 263 263 ret |= __put_user_inatomic(data.v[1], p++); 264 264 ret |= __put_user_inatomic(data.v[2], p++); 265 265 ret |= __put_user_inatomic(data.v[3], p++); 266 - /* fall through */ 266 + fallthrough; 267 267 case 4: 268 268 ret |= __put_user_inatomic(data.v[4], p++); 269 269 ret |= __put_user_inatomic(data.v[5], p++); 270 - /* fall through */ 270 + fallthrough; 271 271 case 2: 272 272 ret |= __put_user_inatomic(data.v[6], p++); 273 273 ret |= __put_user_inatomic(data.v[7], p++);
+1 -1
arch/powerpc/platforms/powermac/feature.c
··· 1465 1465 case 2: 1466 1466 if (macio->type == macio_shasta) 1467 1467 break; 1468 - /* fall through */ 1468 + fallthrough; 1469 1469 default: 1470 1470 return -ENODEV; 1471 1471 }
+1 -1
arch/powerpc/platforms/powernv/opal-async.c
··· 104 104 */ 105 105 case ASYNC_TOKEN_DISPATCHED: 106 106 opal_async_tokens[token].state = ASYNC_TOKEN_ABANDONED; 107 - /* Fall through */ 107 + fallthrough; 108 108 default: 109 109 rc = 1; 110 110 }
+1 -1
arch/powerpc/platforms/pseries/hvcserver.c
··· 45 45 case H_LONG_BUSY_ORDER_10_SEC: 46 46 case H_LONG_BUSY_ORDER_100_SEC: 47 47 return -EBUSY; 48 - case H_FUNCTION: /* fall through */ 48 + case H_FUNCTION: 49 49 default: 50 50 return -EPERM; 51 51 }
+1 -1
arch/powerpc/xmon/xmon.c
··· 4278 4278 subcmd = inchar(); 4279 4279 if (isxdigit(subcmd) || subcmd == '\n') 4280 4280 termch = subcmd; 4281 - /* fall through */ 4281 + fallthrough; 4282 4282 case 'f': 4283 4283 scanhex(&num); 4284 4284 if (num >= XMON_NUM_SPUS || !spu_info[num].spu) {