mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shivani Bhardwaj <shivanib134@gmail.com>
To: gregkh@linuxfoundation.org
Cc: oleg.drokin@intel.com, andreas.dilger@intel.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] Staging: lustre: tracefile: Remove wrapper function
Date: Fri,  6 Nov 2015 22:49:07 +0530	[thread overview]
Message-ID: <6c26beadd883d0d7cd7659ca3535ee86ed9a8213.1446830119.git.shivanib134@gmail.com> (raw)
In-Reply-To: <cover.1446830119.git.shivanib134@gmail.com>

Remove the function cfs_trace_free_string_buffer() as it can be replaced
with the standard function kfree().

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
 drivers/staging/lustre/lustre/libcfs/tracefile.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c
index d55dda8..211047f 100644
--- a/drivers/staging/lustre/lustre/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c
@@ -817,11 +817,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;
@@ -842,7 +837,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;
 }
 
@@ -898,7 +893,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;
 }
 
-- 
2.1.0


  parent reply	other threads:[~2015-11-06 17:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 17:17 [PATCH 0/3] Remove wrapper function and clean up the code Shivani Bhardwaj
2015-11-06 17:18 ` [PATCH 1/3] Staging: lustre: module: Replace function calls Shivani Bhardwaj
2015-11-06 22:04   ` Simmons, James A.
2015-11-07 11:15     ` Dan Carpenter
2015-11-07 19:27       ` Dilger, Andreas
2015-11-06 17:19 ` Shivani Bhardwaj [this message]
2015-11-06 22:03   ` [PATCH 2/3] Staging: lustre: tracefile: Remove wrapper function Simmons, James A.
2015-11-06 17:19 ` [PATCH 3/3] Staging: lustre: tracefile: Remove function prototype Shivani Bhardwaj
2015-11-07  7:32   ` Dilger, Andreas
2015-11-07  7:50     ` Shivani Bhardwaj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c26beadd883d0d7cd7659ca3535ee86ed9a8213.1446830119.git.shivanib134@gmail.com \
    --to=shivanib134@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®