From: Shivani Bhardwaj Date: Fri, 6 Nov 2015 17:19:07 +0000 (+0530) Subject: Staging: lustre: tracefile: Remove wrapper function X-Git-Tag: v4.5-rc1~122^2~408 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7cbf673d8b4a68916fe362fe9a9c3a55a604700e;p=karo-tx-linux.git Staging: lustre: tracefile: Remove wrapper function Remove the function cfs_trace_free_string_buffer() as it can be replaced with the standard function kfree(). Signed-off-by: Shivani Bhardwaj Acked-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c index c27e3207e932..65c4f1ab0de8 100644 --- a/drivers/staging/lustre/lustre/libcfs/tracefile.c +++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c @@ -805,11 +805,6 @@ int cfs_trace_allocate_string_buffer(char **str, int nob) return 0; } -void cfs_trace_free_string_buffer(char *str, int nob) -{ - kfree(str); -} - int cfs_trace_dump_debug_buffer_usrstr(void __user *usr_str, int usr_str_nob) { char *str; @@ -830,7 +825,7 @@ int cfs_trace_dump_debug_buffer_usrstr(void __user *usr_str, int usr_str_nob) } rc = cfs_tracefile_dump_all_pages(str); out: - cfs_trace_free_string_buffer(str, usr_str_nob + 1); + kfree(str); return rc; } @@ -886,7 +881,7 @@ int cfs_trace_daemon_command_usrstr(void __user *usr_str, int usr_str_nob) if (rc == 0) rc = cfs_trace_daemon_command(str); - cfs_trace_free_string_buffer(str, usr_str_nob + 1); + kfree(str); return rc; }