qed: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 10 Mar 2021 06:07:01 +0000 (00:07 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Mar 2021 20:45:15 +0000 (12:45 -0800)
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding a couple of break statements instead of
just letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_l2.c
drivers/net/ethernet/qlogic/qed/qed_sriov.c

index 07824bf9d68d999f6206e7b0bfef1b739701d002..dfaf10edfabfd4f14a9c6e1562c9b908bac7d5b2 100644 (file)
@@ -396,6 +396,7 @@ int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
                tpa_param->tpa_ipv6_en_flg = 1;
                tpa_param->tpa_pkt_split_flg = 1;
                tpa_param->tpa_gro_consistent_flg = 1;
+               break;
        default:
                break;
        }
index b8dc5c4591ef52e212776aeece736303092c4ff6..ed2b6fe5a78d374ce117f16e9d76bbc9f5e0efe4 100644 (file)
@@ -4734,6 +4734,7 @@ void qed_inform_vf_link_state(struct qed_hwfn *hwfn)
                         */
                        link.speed = (hwfn->cdev->num_hwfns > 1) ?
                                     100000 : 40000;
+                       break;
                default:
                        /* In auto mode pass PF link image to VF */
                        break;