2020-11-20 18:30:38

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH 018/141] qed: Fix fall-through warnings for Clang

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
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/net/ethernet/qlogic/qed/qed_l2.c | 1 +
drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_l2.c b/drivers/net/ethernet/qlogic/qed/qed_l2.c
index 07824bf9d68d..dfaf10edfabf 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_l2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_l2.c
@@ -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;
}
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
index b8dc5c4591ef..ed2b6fe5a78d 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
@@ -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;
--
2.27.0


2020-11-20 18:53:30

by Igor Russkikh

[permalink] [raw]
Subject: Re: [EXT] [PATCH 018/141] qed: Fix fall-through warnings for Clang



On 20/11/2020 9:26 pm, Gustavo A. R. Silva wrote:
> External Email
>
> ----------------------------------------------------------------------
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_KSPP_linux
> _issues_115&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=GtqbaEwqFLiM6BiwNMdKmpXb5o
> up1VLiSIroUNQwbYA&m=6E7IvGvqcEGj8wEOVoN1BySZhGUVECVTBJCmNiRsHUw&s=J1SWrfEL
> erJOzUlJdD_S5afGaZosmVP8lyKsu9DTULw&e=
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Reviewed-by: Igor Russkikh <[email protected]>

Thanks,
Igor

2020-11-23 22:49:56

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [EXT] [PATCH 018/141] qed: Fix fall-through warnings for Clang

On Fri, Nov 20, 2020 at 09:50:06PM +0300, Igor Russkikh wrote:
>
>
> On 20/11/2020 9:26 pm, Gustavo A. R. Silva wrote:
> > External Email
> >
> > ----------------------------------------------------------------------
> > 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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_KSPP_linux
> > _issues_115&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=GtqbaEwqFLiM6BiwNMdKmpXb5o
> > up1VLiSIroUNQwbYA&m=6E7IvGvqcEGj8wEOVoN1BySZhGUVECVTBJCmNiRsHUw&s=J1SWrfEL
> > erJOzUlJdD_S5afGaZosmVP8lyKsu9DTULw&e=
> > Signed-off-by: Gustavo A. R. Silva <[email protected]>
>
> Reviewed-by: Igor Russkikh <[email protected]>

Thanks, Igor.
--
Gustavo