From ba45fe7e2c354d69b932b341d01ca88d3ac419da Mon Sep 17 00:00:00 2001 From: hqu Date: Fri, 4 Sep 2020 22:58:43 +0800 Subject: [PATCH] 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 --- dp/wifi3.0/dp_main.c | 1 + htc/htc_send.c | 2 ++ umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c | 12 ++++-------- umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c | 3 ++- umac/scan/core/src/wlan_scan_filter.c | 3 ++- umac/scan/core/src/wlan_scan_manager.c | 3 ++- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index f6d3834a40..f7111da6e7 100644 --- a/dp/wifi3.0/dp_main.c +++ b/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); diff --git a/htc/htc_send.c b/htc/htc_send.c index bbf078ef06..011ec29bc5 100644 --- a/htc/htc_send.c +++ b/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" diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c index 11396e070c..422cb88498 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c +++ b/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; } diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c b/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c index cc968dbf73..85e65a47f0 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mlme_sm.c +++ b/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, diff --git a/umac/scan/core/src/wlan_scan_filter.c b/umac/scan/core/src/wlan_scan_filter.c index f16a8f700c..0409777843 100644 --- a/umac/scan/core/src/wlan_scan_filter.c +++ b/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; diff --git a/umac/scan/core/src/wlan_scan_manager.c b/umac/scan/core/src/wlan_scan_manager.c index 6975b1237c..113d69cddd 100644 --- a/umac/scan/core/src/wlan_scan_manager.c +++ b/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);