Commit 83fceac0 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

atomisp: unwrap the _ex malloc/free functions

We are not using these for debugging or debug logging so remove the defines,
trim and rename the functions.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3553065
...@@ -2015,34 +2015,25 @@ ia_css_enable_isys_event_queue(bool enable) ...@@ -2015,34 +2015,25 @@ ia_css_enable_isys_event_queue(bool enable)
return IA_CSS_SUCCESS; return IA_CSS_SUCCESS;
} }
void * void *sh_css_malloc(size_t size)
sh_css_malloc_ex(size_t size, const char *caller_func, int caller_line)
{ {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%d\n",size); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%d\n",size);
(void)caller_func;
(void)caller_line;
if (size > 0 && my_css.malloc) if (size > 0 && my_css.malloc)
return my_css.malloc(size, false); return my_css.malloc(size, false);
return NULL; return NULL;
} }
void * void *sh_css_calloc(size_t N, size_t size)
sh_css_calloc_ex(size_t N, size_t size, const char *caller_func, int caller_line)
{ {
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_calloc() enter: N=%d, size=%d\n",N,size); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_calloc() enter: N=%d, size=%d\n",N,size);
(void)caller_func;
(void)caller_line;
if (size > 0 && my_css.malloc) if (size > 0 && my_css.malloc)
return my_css.malloc(N*size, true); return my_css.malloc(N*size, true);
return NULL; return NULL;
} }
void void sh_css_free(void *ptr)
sh_css_free_ex(void *ptr, const char *caller_func, int caller_line)
{ {
IA_CSS_ENTER_PRIVATE("ptr = %p", ptr); IA_CSS_ENTER_PRIVATE("ptr = %p", ptr);
(void)caller_func;
(void)caller_line;
if (ptr && my_css.free) if (ptr && my_css.free)
my_css.free(ptr); my_css.free(ptr);
IA_CSS_LEAVE_PRIVATE("void"); IA_CSS_LEAVE_PRIVATE("void");
......
...@@ -1002,23 +1002,14 @@ sh_css_params_init(void); ...@@ -1002,23 +1002,14 @@ sh_css_params_init(void);
void void
sh_css_params_uninit(void); sh_css_params_uninit(void);
#define sh_css_malloc(size) sh_css_malloc_ex(size, __func__, __LINE__) void *sh_css_malloc(size_t size);
#define sh_css_calloc(N, size) sh_css_calloc_ex(N, size, __func__, __LINE__)
#define sh_css_free(ptr) sh_css_free_ex(ptr, __func__, __LINE__)
void *sh_css_calloc(size_t N, size_t size);
void * void sh_css_free(void *ptr);
sh_css_malloc_ex(size_t size, const char *caller_func, int caller_line);
void *
sh_css_calloc_ex(size_t N, size_t size, const char *caller_func, int caller_lin);
void
sh_css_free_ex(void *ptr, const char *caller_func, int caller_line);
/* For Acceleration API: Flush FW (shared buffer pointer) arguments */ /* For Acceleration API: Flush FW (shared buffer pointer) arguments */
void void sh_css_flush(struct ia_css_acc_fw *fw);
sh_css_flush(struct ia_css_acc_fw *fw);
void void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment