From f01803c0ef6e42c2b848486c86fb54d77c898fd7 Mon Sep 17 00:00:00 2001 From: "Adam W. Willis" Date: Wed, 14 Oct 2020 15:28:33 -0400 Subject: [PATCH] qcacld-3.0: Cleanup unused variables introduced via LA.UM.9.12.r1-08400 Subsequent to 0e74ab4 ("qcacld-3.0: Merge tag 'LA.UM.9.12.r1-08400-SMxx50.0' into neutrino-msm-hotdogb-4.14") These are likely related to disabled debugging functions or are otherwise guarded by configs which we do not use. Mark as __maybe_unused to keep the code intact and retain theoretical functionality rather than nuking these variables outright. This fixes the following compilation errors: ../drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_send_management_frames.c:5385:19: error: unused variable 'fc' [-Werror,-Wunused-variable] tpSirMacFrameCtl fc = (tpSirMacFrameCtl)frame; ^ ../drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_utils.c:1286:22: error: unused variable 'lim_params' [-Werror,-Wunused-variable] tLimNoShortParams *lim_params = ^ [@0ctobot: Restore 'third_index' variable to it's new location, reverting commit 3d3d5ae ("qcacmn: Remove unused 'third_index' variable")] Signed-off-by: Adam W. Willis --- .../cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c | 1 + .../qcacld-3.0/core/mac/src/pe/lim/lim_send_management_frames.c | 2 +- drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_utils.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/qcacld-3.0/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c b/drivers/staging/qcacld-3.0/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c index 38273bb56882..2c3eecfd967e 100644 --- a/drivers/staging/qcacld-3.0/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +++ b/drivers/staging/qcacld-3.0/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c @@ -752,6 +752,7 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc, uint32_t num_connections = 0; enum policy_mgr_conc_priority_mode first_index = 0; enum policy_mgr_one_connection_mode second_index = 0; + enum policy_mgr_two_connection_mode third_index = 0; enum policy_mgr_pcl_type pcl = PM_NONE; enum policy_mgr_conc_priority_mode conc_system_pref = 0; struct policy_mgr_psoc_priv_obj *pm_ctx; diff --git a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_send_management_frames.c b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_send_management_frames.c index cc8536f93ce1..c17e779a1b35 100644 --- a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_send_management_frames.c @@ -5382,7 +5382,7 @@ QDF_STATUS lim_send_delba_action_frame(struct mac_context *mac_ctx, static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id, uint32_t msg_len, void *packet, uint8_t *frame) { - tpSirMacFrameCtl fc = (tpSirMacFrameCtl)frame; + tpSirMacFrameCtl fc __maybe_unused = (tpSirMacFrameCtl)frame; QDF_STATUS qdf_status; struct pe_session *session; uint16_t auth_ack_status; diff --git a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_utils.c b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_utils.c index 8d090680fd21..010d6865a4ff 100644 --- a/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_utils.c +++ b/drivers/staging/qcacld-3.0/core/mac/src/pe/lim/lim_utils.c @@ -1283,7 +1283,7 @@ lim_update_short_preamble(struct mac_context *mac_ctx, tSirMacAddr peer_mac_addr } if (i >= LIM_PROT_STA_CACHE_SIZE) { - tLimNoShortParams *lim_params = + tLimNoShortParams *lim_params __maybe_unused = &psession_entry->gLimNoShortParams; if (LIM_IS_AP_ROLE(psession_entry)) { #ifdef WLAN_DEBUG