Browse Source

qcacmn: Fix NBUF_MEMORY_DEBUG PERF build error

qdf_net_buf_debug_init/exit() are defined when NBUF_MEMORY_DEBUG is
disabled, but they are not declared in the nbuf header file, leading
to build errors for PERF builds. Make qdf_net_buf_debug_init/exit()
static inline stubs when NBUF_MEMORY_DEBUG is disabled.

Change-Id: I4180086f27873a48cb965abed21f4bca2a4ca3a1
CRs-Fixed: 2222969
Dustin Brown 7 năm trước cách đây
mục cha
commit
3cb98124c1
2 tập tin đã thay đổi với 6 bổ sung15 xóa
  1. 5 2
      qdf/inc/qdf_nbuf.h
  2. 1 13
      qdf/linux/src/qdf_nbuf.c

+ 5 - 2
qdf/inc/qdf_nbuf.h

@@ -1166,7 +1166,10 @@ qdf_nbuf_copy_debug(qdf_nbuf_t buf, uint8_t *file_name,
 	return copied_buf;
 }
 
-#else
+#else /* NBUF_MEMORY_DEBUG */
+
+static inline void qdf_net_buf_debug_init(void) {}
+static inline void qdf_net_buf_debug_exit(void) {}
 
 static inline void qdf_net_buf_debug_acquire_skb(qdf_nbuf_t net_buf,
 			uint8_t *file_name, uint32_t line_num)
@@ -1219,7 +1222,7 @@ static inline qdf_nbuf_t qdf_nbuf_copy(qdf_nbuf_t buf)
 	return __qdf_nbuf_copy(buf);
 }
 
-#endif
+#endif /* NBUF_MEMORY_DEBUG */
 
 #ifdef WLAN_FEATURE_FASTPATH
 /**

+ 1 - 13
qdf/linux/src/qdf_nbuf.c

@@ -2641,20 +2641,8 @@ free_buf:
 }
 qdf_export_symbol(qdf_nbuf_free_debug);
 
-#else
-void qdf_net_buf_debug_init(void)
-{
-}
-
-qdf_export_symbol(qdf_net_buf_debug_init);
-
-void qdf_net_buf_debug_exit(void)
-{
-}
-
-qdf_export_symbol(qdf_net_buf_debug_exit);
+#endif /* NBUF_MEMORY_DEBUG */
 
-#endif /*NBUF_MEMORY_DEBUG */
 #if defined(FEATURE_TSO)
 
 /**