All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Simmons, James A." <simmonsja@ornl.gov>
To: "'Shivani Bhardwaj'" <shivanib134@gmail.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "oleg.drokin@intel.com" <oleg.drokin@intel.com>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"andreas.dilger@intel.com" <andreas.dilger@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 2/3] Staging: lustre: tracefile: Remove wrapper function
Date: Fri, 6 Nov 2015 22:03:28 +0000	[thread overview]
Message-ID: <4353c108035648b689338421a2d4fe65@EXCHCS32.ornl.gov> (raw)
In-Reply-To: <6c26beadd883d0d7cd7659ca3535ee86ed9a8213.1446830119.git.shivanib134@gmail.com>

>-----Original Message-----
>From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On Behalf Of Shivani Bhardwaj
>Sent: Friday, November 06, 2015 12:19 PM
>To: gregkh@linuxfoundation.org
>Cc: oleg.drokin@intel.com; devel@driverdev.osuosl.org; andreas.dilger@intel.com; linux-kernel@vger.kernel.org
>Subject: [PATCH 2/3] 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 <shivanib134@gmail.com>
>---
> drivers/staging/lustre/lustre/libcfs/tracefile.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)

Acked-by: James Simmons <jsimmons@infradead.org>

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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


  reply	other threads:[~2015-11-06 22:03 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 ` [PATCH 2/3] Staging: lustre: tracefile: Remove wrapper function Shivani Bhardwaj
2015-11-06 22:03   ` Simmons, James A. [this message]
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=4353c108035648b689338421a2d4fe65@EXCHCS32.ornl.gov \
    --to=simmonsja@ornl.gov \
    --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 \
    --cc=shivanib134@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.