public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: acme@kernel.org
Cc: jolsa@kernel.org, eranian@google.com,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 1/8] perf, tools: Remove trail argument to color vsprintf
Date: Mon,  3 Aug 2015 17:50:01 -0700	[thread overview]
Message-ID: <1438649408-20807-2-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1438649408-20807-1-git-send-email-andi@firstfloor.org>

From: Jiri Olsa <jolsa@redhat.com>

Seems like it's always '\n' through color_fprintf_ln, which
is not used at all, removing.. ;-)

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 tools/perf/util/color.c | 16 ++--------------
 tools/perf/util/color.h |  1 -
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c
index 55355b3..ff051d2 100644
--- a/tools/perf/util/color.c
+++ b/tools/perf/util/color.c
@@ -68,7 +68,7 @@ static int __color_vsnprintf(char *bf, size_t size, const char *color,
 }
 
 static int __color_vfprintf(FILE *fp, const char *color, const char *fmt,
-		va_list args, const char *trail)
+		va_list args)
 {
 	int r = 0;
 
@@ -87,8 +87,6 @@ static int __color_vfprintf(FILE *fp, const char *color, const char *fmt,
 	r += vfprintf(fp, fmt, args);
 	if (perf_use_color_default && *color)
 		r += fprintf(fp, "%s", PERF_COLOR_RESET);
-	if (trail)
-		r += fprintf(fp, "%s", trail);
 	return r;
 }
 
@@ -100,7 +98,7 @@ int color_vsnprintf(char *bf, size_t size, const char *color,
 
 int color_vfprintf(FILE *fp, const char *color, const char *fmt, va_list args)
 {
-	return __color_vfprintf(fp, color, fmt, args, NULL);
+	return __color_vfprintf(fp, color, fmt, args);
 }
 
 int color_snprintf(char *bf, size_t size, const char *color,
@@ -126,16 +124,6 @@ int color_fprintf(FILE *fp, const char *color, const char *fmt, ...)
 	return r;
 }
 
-int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...)
-{
-	va_list args;
-	int r;
-	va_start(args, fmt);
-	r = __color_vfprintf(fp, color, fmt, args, "\n");
-	va_end(args);
-	return r;
-}
-
 /*
  * This function splits the buffer by newlines and colors the lines individually.
  *
diff --git a/tools/perf/util/color.h b/tools/perf/util/color.h
index 38146f9..a93997f 100644
--- a/tools/perf/util/color.h
+++ b/tools/perf/util/color.h
@@ -35,7 +35,6 @@ int color_vsnprintf(char *bf, size_t size, const char *color,
 int color_vfprintf(FILE *fp, const char *color, const char *fmt, va_list args);
 int color_fprintf(FILE *fp, const char *color, const char *fmt, ...);
 int color_snprintf(char *bf, size_t size, const char *color, const char *fmt, ...);
-int color_fprintf_ln(FILE *fp, const char *color, const char *fmt, ...);
 int color_fwrite_lines(FILE *fp, const char *color, size_t count, const char *buf);
 int value_color_snprintf(char *bf, size_t size, const char *fmt, double value);
 int percent_color_snprintf(char *bf, size_t size, const char *fmt, ...);
-- 
2.4.3


  reply	other threads:[~2015-08-04  0:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04  0:50 perf, tools: Refactor and support interval and CSV metrics v2 Andi Kleen
2015-08-04  0:50 ` Andi Kleen [this message]
2015-08-06  7:03   ` [tip:perf/core] perf tools: Remove trail argument to color vsprintf tip-bot for Jiri Olsa
2015-08-04  0:50 ` [PATCH 2/8] perf, tools: Do not include escape sequences in color_vfprintf return Andi Kleen
2015-08-06  7:03   ` [tip:perf/core] perf " tip-bot for Andi Kleen
2015-08-04  0:50 ` [PATCH 3/8] perf, tools, stat: Move sw clock metrics printout to stat-shadow Andi Kleen
2015-08-04  0:50 ` [PATCH 4/8] perf, tools, stat: Abstract stat metrics printing Andi Kleen
2015-08-04  0:50 ` [PATCH 5/8] perf, tools, stat: Add support for metrics in interval mode Andi Kleen
2015-08-04  0:50 ` [PATCH 6/8] perf, tools, stat: Move noise/running printing into printout Andi Kleen
2015-08-04  0:50 ` [PATCH 7/8] perf, tools, stat: Implement CSV metrics output Andi Kleen
2015-08-04  0:50 ` [PATCH 8/8] perf, tools: Support metrics in --per-core/socket mode Andi Kleen
2015-08-05  7:34 ` perf, tools: Refactor and support interval and CSV metrics v2 Jiri Olsa
2015-08-05 15:42   ` Andi Kleen

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=1438649408-20807-2-git-send-email-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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