[PATCH 05/10] perf debug: Rename __eprintf(va_list args) to veprintf

From: Arnaldo Carvalho de Melo
Date: Tue Feb 16 2016 - 15:35:19 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

Adhering to the naming convention used when va_args is in a printf like
function, e.g. stdio.h.

Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-b5l3wt77ct28dcnriguxtvn6@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/debug.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 86d9c7302598..d6c8d2b2cd70 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -22,7 +22,7 @@ int debug_ordered_events;
static int redirect_to_stderr;
int debug_data_convert;

-static int _eprintf(int level, int var, const char *fmt, va_list args)
+int veprintf(int level, int var, const char *fmt, va_list args)
{
int ret = 0;

@@ -36,24 +36,19 @@ static int _eprintf(int level, int var, const char *fmt, va_list args)
return ret;
}

-int veprintf(int level, int var, const char *fmt, va_list args)
-{
- return _eprintf(level, var, fmt, args);
-}
-
int eprintf(int level, int var, const char *fmt, ...)
{
va_list args;
int ret;

va_start(args, fmt);
- ret = _eprintf(level, var, fmt, args);
+ ret = veprintf(level, var, fmt, args);
va_end(args);

return ret;
}

-static int __eprintf_time(u64 t, const char *fmt, va_list args)
+static int veprintf_time(u64 t, const char *fmt, va_list args)
{
int ret = 0;
u64 secs, usecs, nsecs = t;
@@ -75,7 +70,7 @@ int eprintf_time(int level, int var, u64 t, const char *fmt, ...)

if (var >= level) {
va_start(args, fmt);
- ret = __eprintf_time(t, fmt, args);
+ ret = veprintf_time(t, fmt, args);
va_end(args);
}

@@ -91,7 +86,7 @@ void pr_stat(const char *fmt, ...)
va_list args;

va_start(args, fmt);
- _eprintf(1, verbose, fmt, args);
+ veprintf(1, verbose, fmt, args);
va_end(args);
eprintf(1, verbose, "\n");
}
--
2.5.0