From 2b6982c4a5bda3073b88f4e32a658ca34d56a927 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Tue, 29 May 2018 14:56:11 -0700 Subject: [PATCH] qcacld-3.0: Replace references to cds context typedefs To align with the Linux Kernel coding style replace typedefs cds_context_type and p_cds_contextType with a reference to the underlying struct. Change-Id: Ifc85a9bbecd29614835ed9e61ab143d0387e82b0 CRs-Fixed: 2250667 --- core/cds/inc/cds_sched.h | 3 -- core/cds/src/cds_api.c | 56 ++++++++++++++++++------------------ core/hdd/src/wlan_hdd_ipa.c | 2 +- core/hdd/src/wlan_hdd_main.c | 8 +++--- core/wma/src/wma_data.c | 8 +++--- core/wma/src/wma_main.c | 4 +-- 6 files changed, 39 insertions(+), 42 deletions(-) diff --git a/core/cds/inc/cds_sched.h b/core/cds/inc/cds_sched.h index 2aa6cc2be66a..7c1da20e0db8 100644 --- a/core/cds/inc/cds_sched.h +++ b/core/cds/inc/cds_sched.h @@ -225,9 +225,6 @@ struct cds_context { enum qdf_hang_reason recovery_reason; }; -/* legacy typedefs required until all references are updated */ -typedef struct cds_context cds_context_type, *p_cds_contextType; - /*--------------------------------------------------------------------------- Function declarations and documenation ---------------------------------------------------------------------------*/ diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 166b99d94107..58d1dc856422 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -72,8 +72,8 @@ /* Preprocessor Definitions and Constants */ /* Data definitions */ -static cds_context_type g_cds_context; -static p_cds_contextType gp_cds_context; +static struct cds_context g_cds_context; +static struct cds_context *gp_cds_context; static struct __qdf_device g_qdf_ctx; static uint8_t cds_multicast_logging; @@ -418,7 +418,7 @@ static void cds_set_ac_specs_params(struct cds_config_info *cds_cfg) { int i; - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; if (NULL == cds_cfg) return; @@ -461,7 +461,7 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc) struct hif_opaque_softc *scn; void *HTCHandle; struct hdd_context *hdd_ctx; - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH, "%s: Opening CDS", __func__); @@ -1535,7 +1535,7 @@ QDF_STATUS cds_alloc_context(QDF_MODULE_ID moduleID, */ QDF_STATUS cds_set_context(QDF_MODULE_ID module_id, void *context) { - p_cds_contextType p_cds_context = cds_get_global_context(); + struct cds_context *p_cds_context = cds_get_global_context(); if (!p_cds_context) { QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, @@ -1972,7 +1972,7 @@ uint64_t cds_get_monotonic_boottime(void) */ void cds_set_wakelock_logging(bool value) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -1993,7 +1993,7 @@ void cds_set_wakelock_logging(bool value) */ bool cds_is_wakelock_enabled(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2016,7 +2016,7 @@ bool cds_is_wakelock_enabled(void) */ void cds_set_ring_log_level(uint32_t ring_id, uint32_t log_level) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; uint32_t log_val; p_cds_context = cds_get_global_context(); @@ -2070,7 +2070,7 @@ void cds_set_ring_log_level(uint32_t ring_id, uint32_t log_level) */ enum wifi_driver_log_level cds_get_ring_log_level(uint32_t ring_id) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2132,7 +2132,7 @@ uint8_t cds_is_multicast_logging(void) */ void cds_init_log_completion(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2164,7 +2164,7 @@ QDF_STATUS cds_set_log_completion(uint32_t is_fatal, uint32_t reason_code, bool recovery_needed) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2203,7 +2203,7 @@ void cds_get_and_reset_log_completion(uint32_t *is_fatal, uint32_t *reason_code, bool *recovery_needed) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2236,7 +2236,7 @@ void cds_get_and_reset_log_completion(uint32_t *is_fatal, */ bool cds_is_log_report_in_progress(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2254,7 +2254,7 @@ bool cds_is_log_report_in_progress(void) */ bool cds_is_fatal_event_enabled(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2271,7 +2271,7 @@ bool cds_is_fatal_event_enabled(void) bool cds_is_ptp_rx_opt_enabled(void) { struct hdd_context *hdd_ctx; - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2293,7 +2293,7 @@ bool cds_is_ptp_rx_opt_enabled(void) bool cds_is_ptp_tx_opt_enabled(void) { struct hdd_context *hdd_ctx; - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2322,7 +2322,7 @@ bool cds_is_ptp_tx_opt_enabled(void) */ uint32_t cds_get_log_indicator(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; uint32_t indicator; p_cds_context = cds_get_global_context(); @@ -2380,7 +2380,7 @@ QDF_STATUS cds_flush_logs(uint32_t is_fatal, uint32_t ret; QDF_STATUS status; - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2460,7 +2460,7 @@ void cds_logging_set_fw_flush_complete(void) */ void cds_set_fatal_event(bool value) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2478,7 +2478,7 @@ void cds_set_fatal_event(bool value) */ int cds_get_radio_index(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2501,7 +2501,7 @@ int cds_get_radio_index(void) */ QDF_STATUS cds_set_radio_index(int radio_index) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -2523,7 +2523,7 @@ QDF_STATUS cds_set_radio_index(int radio_index) void cds_init_ini_config(struct cds_config_info *cfg) { - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; cds_ctx = cds_get_context(QDF_MODULE_ID_QDF); if (!cds_ctx) { @@ -2541,7 +2541,7 @@ void cds_init_ini_config(struct cds_config_info *cfg) */ void cds_deinit_ini_config(void) { - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; cds_ctx = cds_get_context(QDF_MODULE_ID_QDF); if (!cds_ctx) { @@ -2562,7 +2562,7 @@ void cds_deinit_ini_config(void) */ struct cds_config_info *cds_get_ini_config(void) { - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; cds_ctx = cds_get_context(QDF_MODULE_ID_QDF); if (!cds_ctx) { @@ -2580,7 +2580,7 @@ struct cds_config_info *cds_get_ini_config(void) */ bool cds_is_5_mhz_enabled(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_context(QDF_MODULE_ID_QDF); if (!p_cds_context) { @@ -2602,7 +2602,7 @@ bool cds_is_5_mhz_enabled(void) */ bool cds_is_10_mhz_enabled(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_context(QDF_MODULE_ID_QDF); if (!p_cds_context) { @@ -2624,7 +2624,7 @@ bool cds_is_10_mhz_enabled(void) */ bool cds_is_sub_20_mhz_enabled(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_context(QDF_MODULE_ID_QDF); if (!p_cds_context) { @@ -2645,7 +2645,7 @@ bool cds_is_sub_20_mhz_enabled(void) */ bool cds_is_self_recovery_enabled(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_context(QDF_MODULE_ID_QDF); if (!p_cds_context) { diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 6e9eb7b80eb7..1775df62af6e 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -42,7 +42,7 @@ void hdd_ipa_set_tx_flow_info(void) uint8_t staChannel = 0, p2pChannel = 0, apChannel = 0; const char *p2pMode = "DEV"; struct hdd_context *hdd_ctx; - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL uint8_t targetChannel = 0; uint8_t preAdapterChannel = 0; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 476b55d8225b..4c822147cd2f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2412,7 +2412,7 @@ hdd_update_cds_ac_specs_params(struct hdd_context *hdd_ctx) uint8_t tx_sched_wrr_param[TX_SCHED_WRR_PARAMS_NUM]; uint8_t *tx_sched_wrr_ac; int i; - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; if (NULL == hdd_ctx) return; @@ -6730,7 +6730,7 @@ static void hdd_context_destroy(struct hdd_context *hdd_ctx) */ static void wlan_destroy_bug_report_lock(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -10679,7 +10679,7 @@ static void hdd_register_debug_callback(void) */ static void wlan_init_bug_report_lock(void) { - p_cds_contextType p_cds_context; + struct cds_context *p_cds_context; p_cds_context = cds_get_global_context(); if (!p_cds_context) { @@ -13588,7 +13588,7 @@ void hdd_check_and_restart_sap_with_non_dfs_acs(void) { struct hdd_adapter *ap_adapter; struct hdd_context *hdd_ctx; - cds_context_type *cds_ctx; + struct cds_context *cds_ctx; hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (!hdd_ctx) { diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index de4a78349fb4..fe80f08626ea 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -1435,8 +1435,8 @@ wma_mgmt_tx_dload_comp_hldr(void *wma_context, qdf_nbuf_t netbuf, QDF_STATUS wma_tx_attach(tp_wma_handle wma_handle) { /* Get the Vos Context */ - p_cds_contextType cds_handle = - (p_cds_contextType) (wma_handle->cds_context); + struct cds_context *cds_handle = + (struct cds_context *) (wma_handle->cds_context); /* Get the txRx Pdev handle */ struct cdp_pdev *txrx_pdev = cds_handle->pdev_txrx_ctx; @@ -1466,8 +1466,8 @@ QDF_STATUS wma_tx_detach(tp_wma_handle wma_handle) void *soc = cds_get_context(QDF_MODULE_ID_SOC); /* Get the Vos Context */ - p_cds_contextType cds_handle = - (p_cds_contextType) (wma_handle->cds_context); + struct cds_context *cds_handle = + (struct cds_context *) (wma_handle->cds_context); /* Get the txRx Pdev handle */ struct cdp_pdev *txrx_pdev = cds_handle->pdev_txrx_ctx; diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 565fa3117e46..e87e68d94800 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -3580,7 +3580,7 @@ err_event_init: qdf_mem_free(wma_handle->interfaces); err_scn_context: - qdf_mem_free(((p_cds_contextType) cds_context)->cfg_ctx); + qdf_mem_free(((struct cds_context *) cds_context)->cfg_ctx); OS_FREE(wmi_handle); err_wma_handle: @@ -4572,7 +4572,7 @@ QDF_STATUS wma_wmi_service_close(void) /* free the wma_handle */ cds_free_context(QDF_MODULE_ID_WMA, wma_handle); - qdf_mem_free(((p_cds_contextType) cds_ctx)->cfg_ctx); + qdf_mem_free(((struct cds_context *) cds_ctx)->cfg_ctx); WMA_LOGD("%s: Exit", __func__); return QDF_STATUS_SUCCESS; }