Skip to contentSkip to conversation

Remove wrapper function and tidy up the code

PATCH New Shivani Bhardwaj 1 participant 3 messages Nov 2, 2015 Staging

lore
Share & tools
lore
#0 lore raw

cover Remove wrapper function and tidy up the code

This patchset removes a wrapper function and replaces its calls with standard function.
After applying this patchset, code becomes cleaner.

Shivani Bhardwaj (2):
Staging: lustre: tracefile: Replace function calls
Staging: lustre: tracefile: Remove wrapper function

 drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 ++--
 drivers/staging/lustre/lustre/libcfs/tracefile.h | 6 ------
 2 files changed, 2 insertions(+), 8 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/2 Staging: lustre: tracefile: Replace function calls

Replace the calls of function cfs_trace_put_console_buffer() with put_cpu() as former is just a wrapper for latter.

---
 drivers/staging/lustre/lustre/libcfs/tracefile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/libcfs/tracefile.c +2 -2
index 54835fc..211047f 100644
@@ -451,7 +451,7 @@ console:
 		cfs_print_to_console(&header, mask,
 				     string_buf, needed, file, msgdata->msg_fn);
 
-		cfs_trace_put_console_buffer(string_buf);
+		put_cpu();
 	}
 
 	if (cdls != NULL && cdls->cdls_count != 0) {
@@ -465,7 +465,7 @@ console:
 		cfs_print_to_console(&header, mask,
 				     string_buf, needed, file, msgdata->msg_fn);
 
-		cfs_trace_put_console_buffer(string_buf);
+		put_cpu();
 		cdls->cdls_count = 0;
 	}
 
Signature · 1 line
2.1.0
#2 lore raw

PATCH 2/2 Staging: lustre: tracefile: Remove wrapper function

In reply to Shivani Bhardwaj

Remove the function cfs_trace_put_console_buffer() as it is no longer required.

---
 drivers/staging/lustre/lustre/libcfs/tracefile.h | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/lustre/lustre/libcfs/tracefile.h +0 -6
index 4d5fdaf..ba62005 100644
@@ -278,12 +278,6 @@ cfs_trace_get_console_buffer(void)
 	return cfs_trace_console_buffers[i][j];
 }
 
-static inline void
-cfs_trace_put_console_buffer(char *buffer)
-{
-	put_cpu();
-}
-
 static inline struct cfs_trace_cpu_data *
 cfs_trace_get_tcd(void)
 {
Signature · 1 line
2.1.0