Browse Source

qcacld-3.0: Fix compilation if MSM_PLATFORM is not enabled

This CDF_TRACE macro is declared in i_cdf_trace.h and is used
when MSM_PLATFORM is not enabled.
But the inclusion is not in the cdf_nbuf.h, so that it causes
the compilation issue, while CDF_TRACE is not found.

Since this function is used on the data path, so that the warning
is not necessary for non MSM platform.

And also refactor it to avoid compile flag inside the function.

Change-Id: I061eb35f5eee21c76fd486d378e53b35c02b5636
CRs-fixed: 966754
Ryan Hsu 9 years ago
parent
commit
ceb390ceb4
1 changed files with 7 additions and 8 deletions
  1. 7 8
      core/cdf/inc/cdf_nbuf.h

+ 7 - 8
core/cdf/inc/cdf_nbuf.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -912,18 +912,17 @@ static inline uint8_t cdf_nbuf_get_tx_parallel_dnload_frm(cdf_nbuf_t buf)
  *
  * Return: none
  */
+
+#ifdef MSM_PLATFORM
 static inline void cdf_invalidate_range(void *start, void *end)
 {
-#ifdef MSM_PLATFORM
 	dmac_inv_range(start, end);
+}
 #else
-	/* TODO figure out how to invalidate cache on x86 and other
-	   non-MSM platform */
-	CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_FATAL,
-		  "Cache invalidate not yet implemneted for non-MSM platform");
-	return;
-#endif
+static inline void cdf_invalidate_range(void *start, void *end)
+{
 }
+#endif
 
 #if defined(FEATURE_TSO)
 /**