qcacld-3.0: Fix PERF build issue in PMO

Building CLD3.2 with a performance configuration results in several
"potentially uninitialized" warnings. Initialize the relevant variables
to avoid the warnings.

Change-Id: If97b67d50ebe2b7465fd2cc5a6a44488e4cb25a7
CRs-Fixed: 2200294
This commit is contained in:
Dustin Brown
2018-03-05 13:54:29 -08:00
committed by nshrivas
parent 80a328aeaa
commit d3a53dbc06
4 changed files with 18 additions and 8 deletions

View File

@@ -215,7 +215,7 @@ pmo_core_psoc_update_dp_handle(struct wlan_objmgr_psoc *psoc, void *dp_hdl)
*/ */
static inline void *pmo_core_psoc_get_dp_handle(struct wlan_objmgr_psoc *psoc) static inline void *pmo_core_psoc_get_dp_handle(struct wlan_objmgr_psoc *psoc)
{ {
void *dp_hdl; void *dp_hdl = NULL;
struct pmo_psoc_priv_obj *psoc_ctx; struct pmo_psoc_priv_obj *psoc_ctx;
pmo_psoc_with_ctx(psoc, psoc_ctx) { pmo_psoc_with_ctx(psoc, psoc_ctx) {
@@ -289,7 +289,7 @@ pmo_core_psoc_update_htc_handle(struct wlan_objmgr_psoc *psoc, void *htc_hdl)
*/ */
static inline void *pmo_core_psoc_get_htc_handle(struct wlan_objmgr_psoc *psoc) static inline void *pmo_core_psoc_get_htc_handle(struct wlan_objmgr_psoc *psoc)
{ {
void *htc_hdl; void *htc_hdl = NULL;
struct pmo_psoc_priv_obj *psoc_ctx; struct pmo_psoc_priv_obj *psoc_ctx;
pmo_psoc_with_ctx(psoc, psoc_ctx) { pmo_psoc_with_ctx(psoc, psoc_ctx) {

View File

@@ -143,9 +143,19 @@ pmo_psoc_get_priv(struct wlan_objmgr_psoc *psoc)
return psoc_priv; return psoc_priv;
} }
static inline bool __pmo_spinlock_bh_safe(struct pmo_psoc_priv_obj *psoc_ctx)
{
if (!psoc_ctx)
return false;
qdf_spin_lock_bh(&psoc_ctx->lock);
return true;
}
#define pmo_psoc_with_ctx(psoc, cursor) \ #define pmo_psoc_with_ctx(psoc, cursor) \
for (cursor = pmo_psoc_get_priv(psoc), qdf_spin_lock_bh(&cursor->lock);\ for (cursor = pmo_psoc_get_priv(psoc); \
cursor; \ __pmo_spinlock_bh_safe(cursor); \
qdf_spin_unlock_bh(&cursor->lock), cursor = NULL) qdf_spin_unlock_bh(&cursor->lock), cursor = NULL)
/* Tree Navigation: pdev */ /* Tree Navigation: pdev */

View File

@@ -43,7 +43,7 @@ void pmo_core_configure_dynamic_wake_events(struct wlan_objmgr_psoc *psoc);
*/ */
static inline bool pmo_core_get_wow_bus_suspend(struct wlan_objmgr_psoc *psoc) static inline bool pmo_core_get_wow_bus_suspend(struct wlan_objmgr_psoc *psoc)
{ {
bool value; bool value = false;
struct pmo_psoc_priv_obj *psoc_ctx; struct pmo_psoc_priv_obj *psoc_ctx;
pmo_psoc_with_ctx(psoc, psoc_ctx) { pmo_psoc_with_ctx(psoc, psoc_ctx) {
@@ -267,7 +267,7 @@ pmo_core_psoc_update_power_save_mode(struct wlan_objmgr_psoc *psoc,
static inline uint8_t static inline uint8_t
pmo_core_psoc_get_power_save_mode(struct wlan_objmgr_psoc *psoc) pmo_core_psoc_get_power_save_mode(struct wlan_objmgr_psoc *psoc)
{ {
uint8_t value; uint8_t value = 0;
struct pmo_psoc_priv_obj *psoc_ctx; struct pmo_psoc_priv_obj *psoc_ctx;
pmo_psoc_with_ctx(psoc, psoc_ctx) { pmo_psoc_with_ctx(psoc, psoc_ctx) {

View File

@@ -227,7 +227,7 @@ void pmo_core_psoc_set_hif_handle(struct wlan_objmgr_psoc *psoc,
void *pmo_core_psoc_get_hif_handle(struct wlan_objmgr_psoc *psoc) void *pmo_core_psoc_get_hif_handle(struct wlan_objmgr_psoc *psoc)
{ {
void *hif_hdl; void *hif_hdl = NULL;
struct pmo_psoc_priv_obj *psoc_ctx; struct pmo_psoc_priv_obj *psoc_ctx;
pmo_psoc_with_ctx(psoc, psoc_ctx) { pmo_psoc_with_ctx(psoc, psoc_ctx) {
@@ -249,7 +249,7 @@ void pmo_core_psoc_set_txrx_handle(struct wlan_objmgr_psoc *psoc,
void *pmo_core_psoc_get_txrx_handle(struct wlan_objmgr_psoc *psoc) void *pmo_core_psoc_get_txrx_handle(struct wlan_objmgr_psoc *psoc)
{ {
void *txrx_hdl; void *txrx_hdl = NULL;
struct pmo_psoc_priv_obj *psoc_ctx; struct pmo_psoc_priv_obj *psoc_ctx;
pmo_psoc_with_ctx(psoc, psoc_ctx) { pmo_psoc_with_ctx(psoc, psoc_ctx) {