Skip to contentSkip to conversation

qlcnic: Fix fall-through warnings for Clang

PATCH RESEND Superseded Gustavo A. R. Silva 2 participants 3 messages Mar 5, 2021 – May 18, 2021

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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
index bdf15d2a6431..af4c516a9e7c 100644
@@ -1390,6 +1390,7 @@ static int qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int ma
 			break;
 		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
index 96b947fde646..8966f1bcda77 100644
@@ -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
#1 lore raw

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
index bdf15d2a6431..af4c516a9e7c 100644
@@ -1390,6 +1390,7 @@ static int qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int ma
 			break;
 		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
index 96b947fde646..8966f1bcda77 100644
@@ -3455,6 +3455,7 @@ qlcnic_fwinit_work(struct work_struct *work)
 			adapter->fw_wait_cnt = 0;
 			return;
 		}
+		break;
 	case QLCNIC_DEV_FAILED:
 		break;
 	default:
#2 lore raw

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
--
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
index bdf15d2a6431..af4c516a9e7c 100644
@@ -1390,6 +1390,7 @@ static int qlcnic_process_rcv_ring(struct qlcnic_host_sds_ring *sds_ring, int ma
 			break;
 		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
index 96b947fde646..8966f1bcda77 100644
@@ -3455,6 +3455,7 @@ qlcnic_fwinit_work(struct work_struct *work)
 			adapter->fw_wait_cnt = 0;
 			return;
 		}
+		break;
 	case QLCNIC_DEV_FAILED:
 		break;
 	default: