From: Alan Cox Date: Wed, 12 Apr 2017 18:21:22 +0000 (+0100) Subject: atomisp: unwrap the _ex malloc/free functions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=83fceac0504fbcbe2aad420f7791ed740cc20612;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index 7e337e053f6e..aa1941928990 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -2015,34 +2015,25 @@ ia_css_enable_isys_event_queue(bool enable) return IA_CSS_SUCCESS; } -void * -sh_css_malloc_ex(size_t size, const char *caller_func, int caller_line) +void *sh_css_malloc(size_t 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) return my_css.malloc(size, false); return NULL; } -void * -sh_css_calloc_ex(size_t N, size_t size, const char *caller_func, int caller_line) +void *sh_css_calloc(size_t N, size_t 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) return my_css.malloc(N*size, true); return NULL; } -void -sh_css_free_ex(void *ptr, const char *caller_func, int caller_line) +void sh_css_free(void *ptr) { IA_CSS_ENTER_PRIVATE("ptr = %p", ptr); - (void)caller_func; - (void)caller_line; if (ptr && my_css.free) my_css.free(ptr); IA_CSS_LEAVE_PRIVATE("void"); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h index a10892361b0c..e2b6f06ed099 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h @@ -1002,23 +1002,14 @@ sh_css_params_init(void); void sh_css_params_uninit(void); -#define sh_css_malloc(size) sh_css_malloc_ex(size, __func__, __LINE__) -#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_malloc(size_t size); +void *sh_css_calloc(size_t N, size_t size); -void * -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); +void sh_css_free(void *ptr); /* For Acceleration API: Flush FW (shared buffer pointer) arguments */ -void -sh_css_flush(struct ia_css_acc_fw *fw); +void sh_css_flush(struct ia_css_acc_fw *fw); void