powerpc: annotate implicit fall throughs
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 28 Nov 2018 22:28:30 +0000 (09:28 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 4 Dec 2018 08:45:01 +0000 (19:45 +1100)
There is a plan to build the kernel with -Wimplicit-fallthrough and these
places in the code produced warnings, but because we build arch/powerpc
with -Werror, they became errors.  Fix them up.

This patch produces no change in behaviour, but should be reviewed in
case these are actually bugs not intentional fallthoughs.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/nvram_64.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/xmon/xmon.c

index 22e9d281324daf63e92d16b1f32db3ec73aa23ad..06e2eda2430e8647e230db2e725ab4583cc92d00 100644 (file)
@@ -809,6 +809,7 @@ static long dev_nvram_ioctl(struct file *file, unsigned int cmd,
 #ifdef CONFIG_PPC_PMAC
        case OBSOLETE_PMAC_NVRAM_GET_OFFSET:
                printk(KERN_WARNING "nvram: Using obsolete PMAC_NVRAM_GET_OFFSET ioctl\n");
+               /* fall through */
        case IOC_NVRAM_GET_OFFSET: {
                int part, offset;
 
index 073ff454408399e019fa8c19c651b7f6eb1710ea..bdb3316337b67075666a7dbce99cbec8a3c8a7ac 100644 (file)
@@ -1471,6 +1471,7 @@ static long g5_i2s_enable(struct device_node *node, long param, long value)
        case 2:
                if (macio->type == macio_shasta)
                        break;
+               /* fall through */
        default:
                return -ENODEV;
        }
index 1f943e884e85b59f9f18d808b5f5615c8eddcd79..372f4d80bcd631e6d5545c601ca0a596a9ffe230 100644 (file)
@@ -4043,6 +4043,7 @@ static int do_spu_cmd(void)
                subcmd = inchar();
                if (isxdigit(subcmd) || subcmd == '\n')
                        termch = subcmd;
+               /* fall through */
        case 'f':
                scanhex(&num);
                if (num >= XMON_NUM_SPUS || !spu_info[num].spu) {