Forráskód Böngészése

qcacmn: Fix implicit-fallthrough compile error casued by gcc 9.3

Compiling with gcc 9.3 will cause many implicit-fallthrough
compile errors.

Fix is to add keyword fallthrough to resolve such compile error.

Change-Id: I2e7dd1525861d951e3be44f6665e149499f0f5d6
CRs-Fixed: 2785178
hqu 4 éve
szülő
commit
ba45fe7e2c

+ 1 - 0
dp/wifi3.0/dp_main.c

@@ -8752,6 +8752,7 @@ static QDF_STATUS dp_get_vdev_param(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
 		break;
 	case CDP_ENABLE_MCAST_EN:
 		val->cdp_vdev_param_mcast_en = vdev->mcast_enhancement_en;
+		break;
 	case CDP_ENABLE_HLOS_TID_OVERRIDE:
 		val->cdp_vdev_param_hlos_tid_override =
 			    dp_vdev_get_hlos_tid_override((struct cdp_vdev *)vdev);

+ 2 - 0
htc/htc_send.c

@@ -757,6 +757,7 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
 					    (pEndpoint) < 1)
 						break;
 				}
+				/* fallthrough */
 			case QDF_BUS_TYPE_USB:
 				htc_issue_packets_bundle(target,
 							pEndpoint,
@@ -1599,6 +1600,7 @@ static enum HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
 					pEndpoint->total_num_requeues++;
 					pEndpoint->num_requeues_warn = 0;
 				}
+				/* fallthrough */
 			default:
 				QDF_TRACE(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_INFO,
 					  "htc_issue_packets, failed status:%d"

+ 4 - 8
umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c

@@ -214,17 +214,13 @@ static bool wlan_objmgr_del_obj_match(union wlan_objmgr_del_obj *obj,
 {
 	switch (obj_type) {
 	case WLAN_PSOC_OP:
-		if (del_obj->obj_psoc == obj->obj_psoc)
-			return true;
+		return (del_obj->obj_psoc == obj->obj_psoc);
 	case WLAN_PDEV_OP:
-		if (del_obj->obj_pdev == obj->obj_pdev)
-			return true;
+		return (del_obj->obj_pdev == obj->obj_pdev);
 	case WLAN_VDEV_OP:
-		if (del_obj->obj_vdev == obj->obj_vdev)
-			return true;
+		return (del_obj->obj_vdev == obj->obj_vdev);
 	case WLAN_PEER_OP:
-		if (del_obj->obj_peer == obj->obj_peer)
-			return true;
+		return (del_obj->obj_peer == obj->obj_peer);
 	default:
 		return false;
 	}

+ 2 - 1
umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c

@@ -457,7 +457,7 @@ static bool mlme_vdev_state_up_event(void *ctx, uint16_t event,
 		/* These events are not supported in STA mode */
 		if (mode == QDF_STA_MODE)
 			QDF_BUG(0);
-
+		/* fallthrough */
 	case WLAN_VDEV_SM_EV_DOWN:
 		mlme_vdev_sm_transition_to(vdev_mlme, WLAN_VDEV_S_SUSPEND);
 		mlme_vdev_sm_deliver_event(vdev_mlme, event,
@@ -480,6 +480,7 @@ static bool mlme_vdev_state_up_event(void *ctx, uint16_t event,
 		/* Reinit beacon, send template to FW(use ping-pong buffer) */
 		mlme_vdev_update_beacon(vdev_mlme, BEACON_UPDATE,
 					event_data_len, event_data);
+		/* fallthrough */
 	case WLAN_VDEV_SM_EV_START:
 		/* notify that UP command is completed */
 		mlme_vdev_notify_up_complete(vdev_mlme,

+ 2 - 1
umac/scan/core/src/wlan_scan_filter.c

@@ -504,7 +504,8 @@ static bool scm_is_security_match(struct scan_filter *filter,
 			match = scm_check_open(filter, db_entry, security);
 			if (match)
 				break;
-		/* If not OPEN, then check WEP match so fall through */
+		/* If not OPEN, then check WEP match */
+		/* fallthrough */
 		case WLAN_CRYPTO_AUTH_SHARED:
 			match = scm_check_wep(filter, db_entry, security);
 			break;

+ 2 - 1
umac/scan/core/src/wlan_scan_manager.c

@@ -1804,7 +1804,8 @@ scm_scan_event_handler(struct scheduler_msg *msg)
 	case SCAN_EVENT_TYPE_COMPLETED:
 		if (event->reason == SCAN_REASON_COMPLETED)
 			scm_11d_decide_country_code(vdev);
-		/* fall through to release the command */
+		/* release the command */
+		/* fallthrough */
 	case SCAN_EVENT_TYPE_START_FAILED:
 	case SCAN_EVENT_TYPE_DEQUEUED:
 		scm_release_serialization_command(vdev, event->scan_id);