• Gustavo A. R. Silva's avatar
    scsi: qlogicpti: Mark expected switch fall-throughs · 6d44c692
    Gustavo A. R. Silva authored
    Mark switch cases where we are expecting to fall through.
    
    This patch fixes the following warnings (Building: sparc defconfig):
    
    drivers/scsi/qlogicpti.c: In function 'qlogicpti_mbox_command':
    drivers/scsi/qlogicpti.c:202:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 6: sbus_writew(param[5], qpti->qregs + MBOX5);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:203:2: note: here
      case 5: sbus_writew(param[4], qpti->qregs + MBOX4);
      ^~~~
    drivers/scsi/qlogicpti.c:203:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 5: sbus_writew(param[4], qpti->qregs + MBOX4);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:204:2: note: here
      case 4: sbus_writew(param[3], qpti->qregs + MBOX3);
      ^~~~
    drivers/scsi/qlogicpti.c:204:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 4: sbus_writew(param[3], qpti->qregs + MBOX3);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:205:2: note: here
      case 3: sbus_writew(param[2], qpti->qregs + MBOX2);
      ^~~~
    drivers/scsi/qlogicpti.c:205:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 3: sbus_writew(param[2], qpti->qregs + MBOX2);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:206:2: note: here
      case 2: sbus_writew(param[1], qpti->qregs + MBOX1);
      ^~~~
    drivers/scsi/qlogicpti.c:206:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 2: sbus_writew(param[1], qpti->qregs + MBOX1);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:207:2: note: here
      case 1: sbus_writew(param[0], qpti->qregs + MBOX0);
      ^~~~
    drivers/scsi/qlogicpti.c:256:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 6: param[5] = sbus_readw(qpti->qregs + MBOX5);
              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:257:2: note: here
      case 5: param[4] = sbus_readw(qpti->qregs + MBOX4);
      ^~~~
    drivers/scsi/qlogicpti.c:257:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 5: param[4] = sbus_readw(qpti->qregs + MBOX4);
              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:258:2: note: here
      case 4: param[3] = sbus_readw(qpti->qregs + MBOX3);
      ^~~~
    drivers/scsi/qlogicpti.c:258:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 4: param[3] = sbus_readw(qpti->qregs + MBOX3);
              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:259:2: note: here
      case 3: param[2] = sbus_readw(qpti->qregs + MBOX2);
      ^~~~
    drivers/scsi/qlogicpti.c:259:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 3: param[2] = sbus_readw(qpti->qregs + MBOX2);
              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:260:2: note: here
      case 2: param[1] = sbus_readw(qpti->qregs + MBOX1);
      ^~~~
    drivers/scsi/qlogicpti.c:260:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
      case 2: param[1] = sbus_readw(qpti->qregs + MBOX1);
              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/qlogicpti.c:261:2: note: here
      case 1: param[0] = sbus_readw(qpti->qregs + MBOX0);
      ^~~~
    Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    6d44c692
qlogicpti.c 40.2 KB