Skip to content

Commit 83fceac

Browse files
Alan Coxgregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b355306 commit 83fceac

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,34 +2015,25 @@ ia_css_enable_isys_event_queue(bool enable)
20152015
return IA_CSS_SUCCESS;
20162016
}
20172017

2018-
void *
2019-
sh_css_malloc_ex(size_t size, const char *caller_func, int caller_line)
2018+
void *sh_css_malloc(size_t size)
20202019
{
20212020
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_malloc() enter: size=%d\n",size);
2022-
(void)caller_func;
2023-
(void)caller_line;
20242021
if (size > 0 && my_css.malloc)
20252022
return my_css.malloc(size, false);
20262023
return NULL;
20272024
}
20282025

2029-
void *
2030-
sh_css_calloc_ex(size_t N, size_t size, const char *caller_func, int caller_line)
2026+
void *sh_css_calloc(size_t N, size_t size)
20312027
{
20322028
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "sh_css_calloc() enter: N=%d, size=%d\n",N,size);
2033-
(void)caller_func;
2034-
(void)caller_line;
20352029
if (size > 0 && my_css.malloc)
20362030
return my_css.malloc(N*size, true);
20372031
return NULL;
20382032
}
20392033

2040-
void
2041-
sh_css_free_ex(void *ptr, const char *caller_func, int caller_line)
2034+
void sh_css_free(void *ptr)
20422035
{
20432036
IA_CSS_ENTER_PRIVATE("ptr = %p", ptr);
2044-
(void)caller_func;
2045-
(void)caller_line;
20462037
if (ptr && my_css.free)
20472038
my_css.free(ptr);
20482039
IA_CSS_LEAVE_PRIVATE("void");

drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,23 +1002,14 @@ sh_css_params_init(void);
10021002
void
10031003
sh_css_params_uninit(void);
10041004

1005-
#define sh_css_malloc(size) sh_css_malloc_ex(size, __func__, __LINE__)
1006-
#define sh_css_calloc(N, size) sh_css_calloc_ex(N, size, __func__, __LINE__)
1007-
#define sh_css_free(ptr) sh_css_free_ex(ptr, __func__, __LINE__)
1005+
void *sh_css_malloc(size_t size);
10081006

1007+
void *sh_css_calloc(size_t N, size_t size);
10091008

1010-
void *
1011-
sh_css_malloc_ex(size_t size, const char *caller_func, int caller_line);
1012-
1013-
void *
1014-
sh_css_calloc_ex(size_t N, size_t size, const char *caller_func, int caller_lin);
1015-
1016-
void
1017-
sh_css_free_ex(void *ptr, const char *caller_func, int caller_line);
1009+
void sh_css_free(void *ptr);
10181010

10191011
/* For Acceleration API: Flush FW (shared buffer pointer) arguments */
1020-
void
1021-
sh_css_flush(struct ia_css_acc_fw *fw);
1012+
void sh_css_flush(struct ia_css_acc_fw *fw);
10221013

10231014

10241015
void

0 commit comments

Comments
 (0)