powerpc: Use fallthrough pseudo-keyword
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 27 Jul 2020 22:42:01 +0000 (17:42 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 11:09:37 +0000 (21:09 +1000)
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
arch/powerpc/kernel/align.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/powernv/opal-async.c
arch/powerpc/platforms/pseries/hvcserver.c
arch/powerpc/xmon/xmon.c

index 1f1ce8b..c7797eb 100644 (file)
@@ -178,11 +178,11 @@ static int emulate_spe(struct pt_regs *regs, unsigned int reg,
                        ret |= __get_user_inatomic(temp.v[1], p++);
                        ret |= __get_user_inatomic(temp.v[2], p++);
                        ret |= __get_user_inatomic(temp.v[3], p++);
-                       /* fall through */
+                       fallthrough;
                case 4:
                        ret |= __get_user_inatomic(temp.v[4], p++);
                        ret |= __get_user_inatomic(temp.v[5], p++);
-                       /* fall through */
+                       fallthrough;
                case 2:
                        ret |= __get_user_inatomic(temp.v[6], p++);
                        ret |= __get_user_inatomic(temp.v[7], p++);
@@ -263,11 +263,11 @@ static int emulate_spe(struct pt_regs *regs, unsigned int reg,
                        ret |= __put_user_inatomic(data.v[1], p++);
                        ret |= __put_user_inatomic(data.v[2], p++);
                        ret |= __put_user_inatomic(data.v[3], p++);
-                       /* fall through */
+                       fallthrough;
                case 4:
                        ret |= __put_user_inatomic(data.v[4], p++);
                        ret |= __put_user_inatomic(data.v[5], p++);
-                       /* fall through */
+                       fallthrough;
                case 2:
                        ret |= __put_user_inatomic(data.v[6], p++);
                        ret |= __put_user_inatomic(data.v[7], p++);
index 181caa3..5c77b9a 100644 (file)
@@ -1465,7 +1465,7 @@ static long g5_i2s_enable(struct device_node *node, long param, long value)
        case 2:
                if (macio->type == macio_shasta)
                        break;
-               /* fall through */
+               fallthrough;
        default:
                return -ENODEV;
        }
index 1656e89..c094fdf 100644 (file)
@@ -104,7 +104,7 @@ static int __opal_async_release_token(int token)
         */
        case ASYNC_TOKEN_DISPATCHED:
                opal_async_tokens[token].state = ASYNC_TOKEN_ABANDONED;
-               /* Fall through */
+               fallthrough;
        default:
                rc = 1;
        }
index 267139b..96e18d3 100644 (file)
@@ -45,7 +45,7 @@ static int hvcs_convert(long to_convert)
                case H_LONG_BUSY_ORDER_10_SEC:
                case H_LONG_BUSY_ORDER_100_SEC:
                        return -EBUSY;
-               case H_FUNCTION: /* fall through */
+               case H_FUNCTION:
                default:
                        return -EPERM;
        }
index 4923347..df7bca0 100644 (file)
@@ -4278,7 +4278,7 @@ static int do_spu_cmd(void)
                subcmd = inchar();
                if (isxdigit(subcmd) || subcmd == '\n')
                        termch = subcmd;
-               /* fall through */
+               fallthrough;
        case 'f':
                scanhex(&num);
                if (num >= XMON_NUM_SPUS || !spu_info[num].spu) {