qlcnic: Fix fall-through warnings for Clang
Subsystems (3)
PATCH RESEND 1/1 qlcnic: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a break and a goto statements instead of just letting the code fall through to the next case.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 1 + drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + 2 files changed, 2 insertions(+)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +1 -0
@@ -1390,6 +1390,7 @@ static int qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int mabreak ;case QLCNIC_RESPONSE_DESC :qlcnic_handle_fw_message (desc_cnt, consumer, sds_ring); + goto skip;default : goto skip; }
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +1 -0
@@ -3455,6 +3455,7 @@ qlcnic_fwinit_work(struct work_struct *work) adapter->fw_wait_cnt =0 ;return ; } +break ;case QLCNIC_DEV_FAILED :break ;default :
Signature · 1 line
2.27.0
Hi all,
Friendly ping: who can take this, please?
Thanks
--
Gustavo
Quoted 36 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a break and a goto statements instead of just letting the code fall through to the next case.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 1 + drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + 2 files changed, 2 insertions(+)drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +1
-0@@ -1390,6 +1390,7 @@ static int qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int mabreak ;case QLCNIC_RESPONSE_DESC :qlcnic_handle_fw_message (desc_cnt, consumer, sds_ring); + goto skip;default : goto skip; }drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +1
-0@@ -3455,6 +3455,7 @@ qlcnic_fwinit_work(struct work_struct *work) adapter->fw_wait_cnt =0 ;return ; } +break ;case QLCNIC_DEV_FAILED :break ;default :
Hi,
I'm taking this in my -next[1] branch for v5.14.
Thanks
--
Gustavo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp
Quoted 45 lines · Gustavo A. R. Silva
Hi all,
Friendly ping: who can take this, please?
Thanks
--
GustavoQuoted 36 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a break and a goto statements instead of just letting the code fall through to the next case.
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 1 + drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + 2 files changed, 2 insertions(+)drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +1
-0@@ -1390,6 +1390,7 @@ static int qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int mabreak ;case QLCNIC_RESPONSE_DESC :qlcnic_handle_fw_message (desc_cnt, consumer, sds_ring); + goto skip;default : goto skip; }drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +1
-0@@ -3455,6 +3455,7 @@ qlcnic_fwinit_work(struct work_struct *work) adapter->fw_wait_cnt =0 ;return ; } +break ;case QLCNIC_DEV_FAILED :break ;default :