Parcourir la source

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
Yu Wang il y a 8 ans
Parent
commit
c7db7117a4
2 fichiers modifiés avec 2 ajouts et 5 suppressions
  1. 2 3
      core/cds/inc/cds_sched.h
  2. 0 2
      core/cds/src/cds_sched.c

+ 2 - 3
core/cds/inc/cds_sched.h

@@ -68,11 +68,10 @@
 ** OL Rx thread.
 */
 #define CDS_MAX_OL_RX_PKT 4000
+#endif
 
 typedef void (*cds_ol_rx_thread_cb)(void *context, void *rxpkt, uint16_t staid);
-#endif
 
-#ifdef QCA_CONFIG_SMP
 /*
 ** 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;
 }
 
 /**

+ 0 - 2
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