qcacmn: Add logs in wmi_buf_alloc()
In wmi_buf_alloc() function, pass function name and
line number of caller and log the same in case of failure,
this approach helps to remove error logs in caller function
there by reducing text segment.
Also add wmi_nofl_* macros.
Change-Id: Ib1ac8bf2bbcefa7f0015aff2733d3dc4773b185d
CRs-Fixed: 2281983
diff --git a/wmi_unified_api.h b/wmi_unified_api.h
index a4274ac..c30e823 100644
--- a/wmi_unified_api.h
+++ b/wmi_unified_api.h
@@ -201,7 +201,18 @@
wmi_buf_alloc_debug(wmi_unified_t wmi_handle, uint32_t len,
uint8_t *file_name, uint32_t line_num);
#else
-wmi_buf_t wmi_buf_alloc(wmi_unified_t wmi_handle, uint32_t len);
+/**
+ * wmi_buf_alloc() - generic function to allocate WMI buffer
+ * @wmi_handle: handle to WMI.
+ * @len: length of the buffer
+ *
+ * Return: return wmi_buf_t or null if memory alloc fails
+ */
+#define wmi_buf_alloc(wmi_handle, len) \
+ wmi_buf_alloc_fl(wmi_handle, len, __func__, __LINE__)
+
+wmi_buf_t wmi_buf_alloc_fl(wmi_unified_t wmi_handle, uint32_t len,
+ const char *func, uint32_t line);
#endif
/**