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

Merge tag 'Wimplicit-fallthrough-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux

Pull fall-through fixes from Gustavo A. R. Silva:
"Mark more switch cases where we are expecting to fall through, fixing
fall-through warnings in arm, sparc64, mips, i386 and s390"

* tag 'Wimplicit-fallthrough-5.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
ARM: ep93xx: Mark expected switch fall-through
scsi: fas216: Mark expected switch fall-throughs
pcmcia: db1xxx_ss: Mark expected switch fall-throughs
video: fbdev: omapfb_main: Mark expected switch fall-throughs
watchdog: riowd: Mark expected switch fall-through
s390/net: Mark expected switch fall-throughs
crypto: ux500/crypt: Mark expected switch fall-throughs
watchdog: wdt977: Mark expected switch fall-through
watchdog: scx200_wdt: Mark expected switch fall-through
watchdog: Mark expected switch fall-throughs
ARM: signal: Mark expected switch fall-through
mfd: omap-usb-host: Mark expected switch fall-throughs
mfd: db8500-prcmu: Mark expected switch fall-throughs
ARM: OMAP: dma: Mark expected switch fall-throughs
ARM: alignment: Mark expected switch fall-throughs
ARM: tegra: Mark expected switch fall-through
ARM/hw_breakpoint: Mark expected switch fall-throughs

+58 -18
+5
arch/arm/kernel/hw_breakpoint.c
··· 544 544 if ((hw->ctrl.type != ARM_BREAKPOINT_EXECUTE) 545 545 && max_watchpoint_len >= 8) 546 546 break; 547 + /* Else, fall through */ 547 548 default: 548 549 return -EINVAL; 549 550 } ··· 609 608 /* Allow halfword watchpoints and breakpoints. */ 610 609 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_2) 611 610 break; 611 + /* Else, fall through */ 612 612 case 3: 613 613 /* Allow single byte watchpoint. */ 614 614 if (hw->ctrl.len == ARM_BREAKPOINT_LEN_1) 615 615 break; 616 + /* Else, fall through */ 616 617 default: 617 618 ret = -EINVAL; 618 619 goto out; ··· 864 861 break; 865 862 case ARM_ENTRY_ASYNC_WATCHPOINT: 866 863 WARN(1, "Asynchronous watchpoint exception taken. Debugging results may be unreliable\n"); 864 + /* Fall through */ 867 865 case ARM_ENTRY_SYNC_WATCHPOINT: 868 866 watchpoint_handler(addr, fsr, regs); 869 867 break; ··· 913 909 ARM_DBG_READ(c1, c1, 4, oslsr); 914 910 if (oslsr & ARM_OSLSR_OSLM0) 915 911 return true; 912 + /* Else, fall through */ 916 913 default: 917 914 return false; 918 915 }
+1
arch/arm/kernel/signal.c
··· 596 596 switch (retval) { 597 597 case -ERESTART_RESTARTBLOCK: 598 598 restart -= 2; 599 + /* Fall through */ 599 600 case -ERESTARTNOHAND: 600 601 case -ERESTARTSYS: 601 602 case -ERESTARTNOINTR:
+1
arch/arm/mach-ep93xx/crunch.c
··· 49 49 * FALLTHROUGH: Ensure we don't try to overwrite our newly 50 50 * initialised state information on the first fault. 51 51 */ 52 + /* Fall through */ 52 53 53 54 case THREAD_NOTIFY_EXIT: 54 55 crunch_task_release(thread);
+1 -1
arch/arm/mach-tegra/reset.c
··· 70 70 switch (err) { 71 71 case -ENOSYS: 72 72 tegra_cpu_reset_handler_set(reset_address); 73 - /* pass-through */ 73 + /* fall through */ 74 74 case 0: 75 75 is_enabled = true; 76 76 break;
+3 -1
arch/arm/mm/alignment.c
··· 695 695 return subset[(L<<1) | ((tinstr & (1<<8)) >> 8)] | 696 696 (tinstr & 255); /* register_list */ 697 697 } 698 - /* Else fall through for illegal instruction case */ 698 + /* Else, fall through - for illegal instruction case */ 699 699 700 700 default: 701 701 return BAD_INSTR; ··· 751 751 case 0xe8e0: 752 752 case 0xe9e0: 753 753 poffset->un = (tinst2 & 0xff) << 2; 754 + /* Fall through */ 755 + 754 756 case 0xe940: 755 757 case 0xe9c0: 756 758 return do_alignment_ldrdstrd;
+5 -9
arch/arm/plat-omap/dma.c
··· 388 388 /* 389 389 * not supported by current hardware on OMAP1 390 390 * w |= (0x03 << 7); 391 - * fall through 392 391 */ 392 + /* fall through */ 393 393 case OMAP_DMA_DATA_BURST_16: 394 394 if (dma_omap2plus()) { 395 395 burst = 0x3; 396 396 break; 397 397 } 398 - /* 399 - * OMAP1 don't support burst 16 400 - * fall through 401 - */ 398 + /* OMAP1 don't support burst 16 */ 399 + /* fall through */ 402 400 default: 403 401 BUG(); 404 402 } ··· 472 474 burst = 0x3; 473 475 break; 474 476 } 475 - /* 476 - * OMAP1 don't support burst 16 477 - * fall through 478 - */ 477 + /* OMAP1 don't support burst 16 */ 478 + /* fall through */ 479 479 default: 480 480 printk(KERN_ERR "Invalid DMA burst mode\n"); 481 481 BUG();
+6
drivers/crypto/ux500/cryp/cryp.c
··· 314 314 case CRYP_KEY_SIZE_256: 315 315 ctx->key_4_l = readl_relaxed(&src_reg->key_4_l); 316 316 ctx->key_4_r = readl_relaxed(&src_reg->key_4_r); 317 + /* Fall through */ 317 318 318 319 case CRYP_KEY_SIZE_192: 319 320 ctx->key_3_l = readl_relaxed(&src_reg->key_3_l); 320 321 ctx->key_3_r = readl_relaxed(&src_reg->key_3_r); 322 + /* Fall through */ 321 323 322 324 case CRYP_KEY_SIZE_128: 323 325 ctx->key_2_l = readl_relaxed(&src_reg->key_2_l); 324 326 ctx->key_2_r = readl_relaxed(&src_reg->key_2_r); 327 + /* Fall through */ 325 328 326 329 default: 327 330 ctx->key_1_l = readl_relaxed(&src_reg->key_1_l); ··· 364 361 case CRYP_KEY_SIZE_256: 365 362 writel_relaxed(ctx->key_4_l, &reg->key_4_l); 366 363 writel_relaxed(ctx->key_4_r, &reg->key_4_r); 364 + /* Fall through */ 367 365 368 366 case CRYP_KEY_SIZE_192: 369 367 writel_relaxed(ctx->key_3_l, &reg->key_3_l); 370 368 writel_relaxed(ctx->key_3_r, &reg->key_3_r); 369 + /* Fall through */ 371 370 372 371 case CRYP_KEY_SIZE_128: 373 372 writel_relaxed(ctx->key_2_l, &reg->key_2_l); 374 373 writel_relaxed(ctx->key_2_r, &reg->key_2_r); 374 + /* Fall through */ 375 375 376 376 default: 377 377 writel_relaxed(ctx->key_1_l, &reg->key_1_l);
+2
drivers/mfd/db8500-prcmu.c
··· 1590 1590 switch (divsel) { 1591 1591 case PRCM_DSI_PLLOUT_SEL_PHI_4: 1592 1592 div *= 2; 1593 + /* Fall through */ 1593 1594 case PRCM_DSI_PLLOUT_SEL_PHI_2: 1594 1595 div *= 2; 1596 + /* Fall through */ 1595 1597 case PRCM_DSI_PLLOUT_SEL_PHI: 1596 1598 return pll_rate(PRCM_PLLDSI_FREQ, clock_rate(PRCMU_HDMICLK), 1597 1599 PLL_RAW) / div;
+2 -2
drivers/mfd/omap-usb-host.c
··· 308 308 i, r); 309 309 } 310 310 } 311 - /* Fall through as HSIC mode needs utmi_clk */ 311 + /* Fall through - as HSIC mode needs utmi_clk */ 312 312 313 313 case OMAP_EHCI_PORT_MODE_TLL: 314 314 if (!IS_ERR(omap->utmi_clk[i])) { ··· 344 344 345 345 if (!IS_ERR(omap->hsic480m_clk[i])) 346 346 clk_disable_unprepare(omap->hsic480m_clk[i]); 347 - /* Fall through as utmi_clks were used in HSIC mode */ 347 + /* Fall through - as utmi_clks were used in HSIC mode */ 348 348 349 349 case OMAP_EHCI_PORT_MODE_TLL: 350 350 if (!IS_ERR(omap->utmi_clk[i]))
+4
drivers/pcmcia/db1xxx_ss.c
··· 255 255 switch (state->Vcc) { 256 256 case 50: 257 257 ++v; 258 + /* fall through */ 258 259 case 33: 259 260 ++v; 261 + /* fall through */ 260 262 case 0: 261 263 break; 262 264 default: ··· 269 267 switch (state->Vpp) { 270 268 case 12: 271 269 ++p; 270 + /* fall through */ 272 271 case 33: 273 272 case 50: 274 273 ++p; 274 + /* fall through */ 275 275 case 0: 276 276 break; 277 277 default:
+1
drivers/s390/net/ctcm_fsms.c
··· 1704 1704 grp->changed_side = 2; 1705 1705 break; 1706 1706 } 1707 + /* Else, fall through */ 1707 1708 case MPCG_STATE_XID0IOWAIX: 1708 1709 case MPCG_STATE_XID7INITW: 1709 1710 case MPCG_STATE_XID7INITX:
+3
drivers/s390/net/ctcm_mpc.c
··· 357 357 /*fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW);*/ 358 358 if (callback) 359 359 grp->send_qllc_disc = 1; 360 + /* Else, fall through */ 360 361 case MPCG_STATE_XID0IOWAIT: 361 362 fsm_deltimer(&grp->timer); 362 363 grp->outstanding_xid2 = 0; ··· 1470 1469 if ((fsm_getstate(rch->fsm) == CH_XID0_PENDING) && 1471 1470 (fsm_getstate(wch->fsm) == CH_XID0_PENDING)) 1472 1471 break; 1472 + /* Else, fall through */ 1473 1473 default: 1474 1474 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev); 1475 1475 } ··· 2091 2089 grp->estconnfunc = NULL; 2092 2090 break; 2093 2091 } 2092 + /* Else, fall through */ 2094 2093 case MPCG_STATE_FLOWC: 2095 2094 case MPCG_STATE_READY: 2096 2095 grp->send_qllc_disc = 2;
+1 -1
drivers/s390/net/qeth_l2_main.c
··· 333 333 card->osn_info.data_cb(skb); 334 334 break; 335 335 } 336 - /* else unknown */ 336 + /* Else, fall through */ 337 337 default: 338 338 dev_kfree_skb_any(skb); 339 339 QETH_CARD_TEXT(card, 3, "inbunkno");
+8
drivers/scsi/arm/fas216.c
··· 603 603 msgqueue_flush(&info->scsi.msgs); 604 604 msgqueue_addmsg(&info->scsi.msgs, 1, MESSAGE_REJECT); 605 605 info->scsi.phase = PHASE_MSGOUT_EXPECT; 606 + /* fall through */ 606 607 607 608 case async: 608 609 dev->period = info->ifcfg.asyncperiod / 4; ··· 916 915 fas216_done(info, DID_ABORT); 917 916 break; 918 917 } 918 + /* else, fall through */ 919 919 920 920 default: /* huh? */ 921 921 printk(KERN_ERR "scsi%d.%c: unexpected disconnect in phase %s\n", ··· 1413 1411 case STATE(STAT_STATUS, PHASE_DATAOUT): /* Data Out -> Status */ 1414 1412 case STATE(STAT_STATUS, PHASE_DATAIN): /* Data In -> Status */ 1415 1413 fas216_stoptransfer(info); 1414 + /* fall through */ 1415 + 1416 1416 case STATE(STAT_STATUS, PHASE_SELSTEPS):/* Sel w/ steps -> Status */ 1417 1417 case STATE(STAT_STATUS, PHASE_MSGOUT): /* Message Out -> Status */ 1418 1418 case STATE(STAT_STATUS, PHASE_COMMAND): /* Command -> Status */ ··· 1426 1422 case STATE(STAT_MESGIN, PHASE_DATAOUT): /* Data Out -> Message In */ 1427 1423 case STATE(STAT_MESGIN, PHASE_DATAIN): /* Data In -> Message In */ 1428 1424 fas216_stoptransfer(info); 1425 + /* fall through */ 1426 + 1429 1427 case STATE(STAT_MESGIN, PHASE_COMMAND): /* Command -> Message In */ 1430 1428 case STATE(STAT_MESGIN, PHASE_SELSTEPS):/* Sel w/ steps -> Message In */ 1431 1429 case STATE(STAT_MESGIN, PHASE_MSGOUT): /* Message Out -> Message In */ ··· 1581 1575 fas216_message(info); 1582 1576 break; 1583 1577 } 1578 + /* else, fall through */ 1584 1579 1585 1580 default: 1586 1581 fas216_log(info, 0, "internal phase %s for function done?" ··· 1964 1957 switch (where_from) { 1965 1958 case TYPE_QUEUE: 1966 1959 fas216_allocate_tag(info, SCpnt); 1960 + /* fall through */ 1967 1961 case TYPE_OTHER: 1968 1962 fas216_start_command(info, SCpnt); 1969 1963 break;
+8
drivers/video/fbdev/omap/omapfb_main.c
··· 447 447 return 0; 448 448 case 12: 449 449 var->bits_per_pixel = 16; 450 + /* fall through */ 450 451 case 16: 451 452 if (plane->fbdev->panel->bpp == 12) 452 453 plane->color_mode = OMAPFB_COLOR_RGB444; ··· 1535 1534 case OMAPFB_ACTIVE: 1536 1535 for (i = 0; i < fbdev->mem_desc.region_cnt; i++) 1537 1536 unregister_framebuffer(fbdev->fb_info[i]); 1537 + /* fall through */ 1538 1538 case 7: 1539 1539 omapfb_unregister_sysfs(fbdev); 1540 + /* fall through */ 1540 1541 case 6: 1541 1542 if (fbdev->panel->disable) 1542 1543 fbdev->panel->disable(fbdev->panel); 1544 + /* fall through */ 1543 1545 case 5: 1544 1546 omapfb_set_update_mode(fbdev, OMAPFB_UPDATE_DISABLED); 1547 + /* fall through */ 1545 1548 case 4: 1546 1549 planes_cleanup(fbdev); 1550 + /* fall through */ 1547 1551 case 3: 1548 1552 ctrl_cleanup(fbdev); 1553 + /* fall through */ 1549 1554 case 2: 1550 1555 if (fbdev->panel->cleanup) 1551 1556 fbdev->panel->cleanup(fbdev->panel); 1557 + /* fall through */ 1552 1558 case 1: 1553 1559 dev_set_drvdata(fbdev->dev, NULL); 1554 1560 kfree(fbdev);
+1
drivers/watchdog/ar7_wdt.c
··· 235 235 ar7_wdt_update_margin(new_margin); 236 236 ar7_wdt_kick(1); 237 237 spin_unlock(&wdt_lock); 238 + /* Fall through */ 238 239 239 240 case WDIOC_GETTIMEOUT: 240 241 if (put_user(margin, (int *)arg))
+1 -1
drivers/watchdog/pcwd.c
··· 651 651 return -EINVAL; 652 652 653 653 pcwd_keepalive(); 654 - /* Fall */ 654 + /* Fall through */ 655 655 656 656 case WDIOC_GETTIMEOUT: 657 657 return put_user(heartbeat, argp);
+1 -1
drivers/watchdog/riowd.c
··· 134 134 return -EINVAL; 135 135 riowd_timeout = (new_margin + 59) / 60; 136 136 riowd_writereg(p, riowd_timeout, WDTO_INDEX); 137 - /* Fall */ 137 + /* Fall through */ 138 138 139 139 case WDIOC_GETTIMEOUT: 140 140 return put_user(riowd_timeout * 60, (int __user *)argp);
+1
drivers/watchdog/sb_wdog.c
··· 202 202 timeout = time; 203 203 sbwdog_set(user_dog, timeout); 204 204 sbwdog_pet(user_dog); 205 + /* Fall through */ 205 206 206 207 case WDIOC_GETTIMEOUT: 207 208 /*
+1
drivers/watchdog/scx200_wdt.c
··· 186 186 margin = new_margin; 187 187 scx200_wdt_update_margin(); 188 188 scx200_wdt_ping(); 189 + /* Fall through */ 189 190 case WDIOC_GETTIMEOUT: 190 191 if (put_user(margin, p)) 191 192 return -EFAULT;
+1 -1
drivers/watchdog/wdt.c
··· 389 389 if (wdt_set_heartbeat(new_heartbeat)) 390 390 return -EINVAL; 391 391 wdt_ping(); 392 - /* Fall */ 392 + /* Fall through */ 393 393 case WDIOC_GETTIMEOUT: 394 394 return put_user(heartbeat, p); 395 395 default:
+1 -1
drivers/watchdog/wdt977.c
··· 398 398 return -EINVAL; 399 399 400 400 wdt977_keepalive(); 401 - /* Fall */ 401 + /* Fall through */ 402 402 403 403 case WDIOC_GETTIMEOUT: 404 404 return put_user(timeout, uarg.i);