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

scsi: fas216: Mark expected switch fall-throughs

Mark switch cases where we are expecting to fall through.

Fix the following warnings (Building: rpc_defconfig arm):

drivers/scsi/arm/fas216.c: In function ‘fas216_disconnect_intr’:
drivers/scsi/arm/fas216.c:913:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (fas216_get_last_msg(info, info->scsi.msgin_fifo) == ABORT) {
^
drivers/scsi/arm/fas216.c:919:2: note: here
default: /* huh? */
^~~~~~~
drivers/scsi/arm/fas216.c: In function ‘fas216_kick’:
drivers/scsi/arm/fas216.c:1959:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
fas216_allocate_tag(info, SCpnt);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/arm/fas216.c:1960:2: note: here
case TYPE_OTHER:
^~~~
drivers/scsi/arm/fas216.c: In function ‘fas216_busservice_intr’:
drivers/scsi/arm/fas216.c:1413:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
fas216_stoptransfer(info);
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/arm/fas216.c:1414:2: note: here
case STATE(STAT_STATUS, PHASE_SELSTEPS):/* Sel w/ steps -> Status */
^~~~
drivers/scsi/arm/fas216.c:1424:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
fas216_stoptransfer(info);
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/arm/fas216.c:1425:2: note: here
case STATE(STAT_MESGIN, PHASE_COMMAND): /* Command -> Message In */
^~~~
drivers/scsi/arm/fas216.c: In function ‘fas216_funcdone_intr’:
drivers/scsi/arm/fas216.c:1573:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if ((stat & STAT_BUSMASK) == STAT_MESGIN) {
^
drivers/scsi/arm/fas216.c:1579:2: note: here
default:
^~~~~~~
drivers/scsi/arm/fas216.c: In function ‘fas216_handlesync’:
drivers/scsi/arm/fas216.c:605:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
info->scsi.phase = PHASE_MSGOUT_EXPECT;
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
drivers/scsi/arm/fas216.c:607:2: note: here
case async:
^~~~

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

+8
+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;