From c7db7117a4760cb672d25f23656d8288b7600c43 Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Thu, 23 Feb 2017 10:03:19 +0800 Subject: [PATCH] qcacld-3.0: fix compile error caused by QCA_CONFIG_SMP Some functions/structs are defined only when QCA_CONFIG_SMP is enabled, however, they are also used when QCA_CONFIG_SMP is disabled, which will cause compilation errors. Move the definition of these functions/structs out of macro QCA_CONFIG_SMP. Return type of cds_alloc_ol_rx_pkt() is not void, but there is no return statement for it when QCA_CONFIG_SMP is disabled. Add 'return NULL' for cds_alloc_ol_rx_pkt(). Change-Id: If6f4298c27f0089219bbceb4a9d0ba1a295f8dcd CRs-Fixed: 2010568 --- core/cds/inc/cds_sched.h | 7 +++---- core/cds/src/cds_sched.c | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/core/cds/inc/cds_sched.h b/core/cds/inc/cds_sched.h index 8552d941fec5..6ee1d000572f 100644 --- a/core/cds/inc/cds_sched.h +++ b/core/cds/inc/cds_sched.h @@ -68,11 +68,10 @@ ** OL Rx thread. */ #define CDS_MAX_OL_RX_PKT 4000 - -typedef void (*cds_ol_rx_thread_cb)(void *context, void *rxpkt, uint16_t staid); #endif -#ifdef QCA_CONFIG_SMP +typedef void (*cds_ol_rx_thread_cb)(void *context, void *rxpkt, uint16_t staid); + /* ** CDS message wrapper for data rx from TXRX */ @@ -90,7 +89,6 @@ struct cds_ol_rx_pkt { cds_ol_rx_thread_cb callback; }; -#endif /* ** CDS Scheduler context @@ -351,6 +349,7 @@ void cds_indicate_rxpkt(p_cds_sched_context pSchedContext, static inline struct cds_ol_rx_pkt *cds_alloc_ol_rx_pkt(p_cds_sched_context pSchedContext) { + return NULL; } /** diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index 825d966be66f..9b53207903b3 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -91,9 +91,7 @@ static p_cds_sched_context gp_cds_sched_context; static int cds_ol_rx_thread(void *arg); static unsigned long affine_cpu; static QDF_STATUS cds_alloc_ol_rx_pkt_freeq(p_cds_sched_context pSchedContext); -#endif -#ifdef QCA_CONFIG_SMP #define CDS_CORE_PER_CLUSTER (4) /*Maximum 2 clusters supported*/ #define CDS_MAX_CPU_CLUSTERS 2