qcacld-3.0: Fix PERF build issue in PMO (part 2)
Building CLD3.2 with a performance configuration results in several
"potentially uninitialized" warnings. Initialize the relevant variables
to avoid the warnings.
Change-Id: I6a4324cb313dfb9d3b4c82294bc2fc8ce357fd0b
CRs-Fixed: 2202533
diff --git a/components/pmo/core/src/wlan_pmo_apf.c b/components/pmo/core/src/wlan_pmo_apf.c
index bf67e3f..8acc3c1 100644
--- a/components/pmo/core/src/wlan_pmo_apf.c
+++ b/components/pmo/core/src/wlan_pmo_apf.c
@@ -31,12 +31,12 @@
uint32_t pmo_get_apf_instruction_size(struct wlan_objmgr_psoc *psoc)
{
struct pmo_psoc_priv_obj *psoc_ctx;
- bool enabled;
+ bool apf = false;
pmo_psoc_with_ctx(psoc, psoc_ctx) {
- enabled = pmo_intersect_apf(psoc_ctx);
+ apf = pmo_intersect_apf(psoc_ctx);
}
- return enabled ? PMO_APF_SIZE_AUTO : PMO_APF_SIZE_DISABLE;
+ return apf ? PMO_APF_SIZE_AUTO : PMO_APF_SIZE_DISABLE;
}
diff --git a/components/pmo/core/src/wlan_pmo_pkt_filter.c b/components/pmo/core/src/wlan_pmo_pkt_filter.c
index 8aaa32e..6226810 100644
--- a/components/pmo/core/src/wlan_pmo_pkt_filter.c
+++ b/components/pmo/core/src/wlan_pmo_pkt_filter.c
@@ -30,13 +30,13 @@
uint8_t pmo_get_num_packet_filters(struct wlan_objmgr_psoc *psoc)
{
struct pmo_psoc_priv_obj *psoc_ctx;
- bool enabled;
+ bool pkt_filter = false;
pmo_psoc_with_ctx(psoc, psoc_ctx) {
- enabled = pmo_intersect_packet_filter(psoc_ctx);
+ pkt_filter = pmo_intersect_packet_filter(psoc_ctx);
}
- return enabled ? PMO_PKT_FILTERS_DEFAULT : PMO_PKT_FILTERS_DISABLED;
+ return pkt_filter ? PMO_PKT_FILTERS_DEFAULT : PMO_PKT_FILTERS_DISABLED;
}
QDF_STATUS pmo_core_set_pkt_filter(struct wlan_objmgr_psoc *psoc,
diff --git a/components/pmo/core/src/wlan_pmo_wow.c b/components/pmo/core/src/wlan_pmo_wow.c
index e1d2710..4d589dd 100644
--- a/components/pmo/core/src/wlan_pmo_wow.c
+++ b/components/pmo/core/src/wlan_pmo_wow.c
@@ -423,9 +423,9 @@
uint8_t pmo_get_num_wow_filters(struct wlan_objmgr_psoc *psoc)
{
struct pmo_psoc_priv_obj *psoc_ctx;
- bool apf;
- bool arp_ns;
- bool pkt_filter;
+ bool apf = false;
+ bool arp_ns = false;
+ bool pkt_filter = false;
pmo_psoc_with_ctx(psoc, psoc_ctx) {
apf = pmo_intersect_apf(psoc_ctx);