]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
scsi: aic94xx: mark expected switch fall-throughs
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Thu, 4 Oct 2018 07:10:09 +0000 (09:10 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 Oct 2018 01:54:41 +0000 (21:54 -0400)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 114988 ("Missing break in switch")
Addresses-Coverity-ID: 114989 ("Missing break in switch")
Addresses-Coverity-ID: 114990 ("Missing break in switch")
Addresses-Coverity-ID: 114991 ("Missing break in switch")
Addresses-Coverity-ID: 114992 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aic94xx/aic94xx_scb.c

index 22873ce8bbfaaf3b97c8d169e251eff8fdc50203..91ea87dfb70033d595568f2681f0024e7f938d71 100644 (file)
@@ -724,9 +724,11 @@ static void set_speed_mask(u8 *speed_mask, struct asd_phy_desc *pd)
        switch (pd->max_sas_lrate) {
        case SAS_LINK_RATE_6_0_GBPS:
                *speed_mask &= ~SAS_SPEED_60_DIS;
+               /* fall through*/
        default:
        case SAS_LINK_RATE_3_0_GBPS:
                *speed_mask &= ~SAS_SPEED_30_DIS;
+               /* fall through*/
        case SAS_LINK_RATE_1_5_GBPS:
                *speed_mask &= ~SAS_SPEED_15_DIS;
        }
@@ -734,6 +736,7 @@ static void set_speed_mask(u8 *speed_mask, struct asd_phy_desc *pd)
        switch (pd->min_sas_lrate) {
        case SAS_LINK_RATE_6_0_GBPS:
                *speed_mask |= SAS_SPEED_30_DIS;
+               /* fall through*/
        case SAS_LINK_RATE_3_0_GBPS:
                *speed_mask |= SAS_SPEED_15_DIS;
        default:
@@ -745,6 +748,7 @@ static void set_speed_mask(u8 *speed_mask, struct asd_phy_desc *pd)
        switch (pd->max_sata_lrate) {
        case SAS_LINK_RATE_3_0_GBPS:
                *speed_mask &= ~SATA_SPEED_30_DIS;
+               /* fall through*/
        default:
        case SAS_LINK_RATE_1_5_GBPS:
                *speed_mask &= ~SATA_SPEED_15_DIS;
@@ -803,6 +807,7 @@ void asd_build_control_phy(struct asd_ascb *ascb, int phy_id, u8 subfunc)
 
                /* link reset retries, this should be nominal */
                control_phy->link_reset_retries = 10;
+               /* fall through */
 
        case RELEASE_SPINUP_HOLD: /* 0x02 */
                /* decide the func_mask */