[PATCH] trace-cmd: Make functions in trace-write-local.h inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

Functions defined in header files really should be marked as static inline
as header files are not to hold the actual code (where a inline is more like
a define, but with stronger typing).

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---

Tzvetomir,

Nothing wrong with your patch, but it made me notice that these functions
were never set as static inline.

-- Steve

 lib/trace-cmd/include/trace-write-local.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/trace-cmd/include/trace-write-local.h b/lib/trace-cmd/include/trace-write-local.h
index 94ad910b..046992f1 100644
--- a/lib/trace-cmd/include/trace-write-local.h
+++ b/lib/trace-cmd/include/trace-write-local.h
@@ -8,7 +8,7 @@
 
 /* Local for trace-input.c, trace-output.c and trace-msg.c */
 
-static ssize_t __do_write(int fd, const void *data, size_t size)
+static inline ssize_t __do_write(int fd, const void *data, size_t size)
 {
 	ssize_t tot = 0;
 	ssize_t w;
@@ -26,7 +26,7 @@ static ssize_t __do_write(int fd, const void *data, size_t size)
 	return tot;
 }
 
-static ssize_t
+static inline ssize_t
 __do_write_check(int fd, const void *data, size_t size)
 {
 	ssize_t ret;
-- 
2.20.1




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux