All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 21/23] perf tools: Unexport some methods unused outside strbuf.c
Date: Wed, 23 Mar 2016 18:17:58 -0300	[thread overview]
Message-ID: <1458767880-3288-22-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1458767880-3288-1-git-send-email-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-nq1wvtky4mpu0nupjyar7sbw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/strbuf.c | 9 ++++++++-
 tools/perf/util/strbuf.h | 7 +------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c
index d3d279275432..8fb73295ec34 100644
--- a/tools/perf/util/strbuf.c
+++ b/tools/perf/util/strbuf.c
@@ -51,6 +51,13 @@ void strbuf_grow(struct strbuf *sb, size_t extra)
 	ALLOC_GROW(sb->buf, sb->len + extra + 1, sb->alloc);
 }
 
+void strbuf_addch(struct strbuf *sb, int c)
+{
+	strbuf_grow(sb, 1);
+	sb->buf[sb->len++] = c;
+	sb->buf[sb->len] = '\0';
+}
+
 void strbuf_add(struct strbuf *sb, const void *data, size_t len)
 {
 	strbuf_grow(sb, len);
@@ -58,7 +65,7 @@ void strbuf_add(struct strbuf *sb, const void *data, size_t len)
 	strbuf_setlen(sb, sb->len + len);
 }
 
-void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap)
+static void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap)
 {
 	int len;
 	va_list ap_saved;
diff --git a/tools/perf/util/strbuf.h b/tools/perf/util/strbuf.h
index b73cbaaf93bc..ab9be0fbbd40 100644
--- a/tools/perf/util/strbuf.h
+++ b/tools/perf/util/strbuf.h
@@ -71,11 +71,7 @@ static inline void strbuf_setlen(struct strbuf *sb, size_t len) {
 }
 
 /*----- add data in your buffer -----*/
-static inline void strbuf_addch(struct strbuf *sb, int c) {
-	strbuf_grow(sb, 1);
-	sb->buf[sb->len++] = c;
-	sb->buf[sb->len] = '\0';
-}
+void strbuf_addch(struct strbuf *sb, int c);
 
 void strbuf_add(struct strbuf *buf, const void *, size_t);
 static inline void strbuf_addstr(struct strbuf *sb, const char *s) {
@@ -84,7 +80,6 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s) {
 
 __attribute__((format(printf,2,3)))
 void strbuf_addf(struct strbuf *sb, const char *fmt, ...);
-void strbuf_addv(struct strbuf *sb, const char *fmt, va_list ap);
 
 /* XXX: if read fails, any partial read is undone */
 ssize_t strbuf_read(struct strbuf *, int fd, ssize_t hint);
-- 
2.5.5

  parent reply	other threads:[~2016-03-23 21:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 21:17 [GIT PULL 00/23] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 01/23] perf test: Remove 'core_id' check in topo test Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 02/23] tools: Move utilities.mak from perf to tools/scripts/ Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 03/23] perf symbols: Record text offset in dso to calculate objdump address Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 04/23] perf bench numa: Fix assertion for nodes bitfield Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 05/23] perf list: Fix documentation of :ppp Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 06/23] perf tools: Remove misplaced __maybe_unused Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 07/23] perf tests: Forward the perf_sample in the dwarf unwind test Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 08/23] perf tools: Add cpumode to struct perf_sample Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 09/23] perf machine: Rename perf_event__preprocess_sample to machine__resolve Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 10/23] perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 11/23] perf script: Remove lots of unused arguments Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 12/23] perf tools: Remove unused DIE_IF macro Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 13/23] perf tools: Simplify die() mechanism Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 14/23] perf tools: Remove needless 'extern' from function prototypes Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 15/23] tools lib traceevent: Remove redundant CPU output Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 16/23] tools include: Copy linux/stringify.h from the kernel Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 17/23] perf tools: Do not include stringify.h from the kernel sources Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 18/23] perf tools: Remove unused perf_pathdup, xstrdup functions Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 19/23] perf help: Use asprintf instead of adhoc equivalents Arnaldo Carvalho de Melo
2016-03-23 21:17 ` [PATCH 20/23] perf probe: No need to use formatting strbuf method Arnaldo Carvalho de Melo
2016-03-23 21:17 ` Arnaldo Carvalho de Melo [this message]
2016-03-23 21:17 ` [PATCH 22/23] perf llvm: Use realpath to canonicalize paths Arnaldo Carvalho de Melo
2016-03-23 21:18 ` [PATCH 23/23] perf llvm: Use strerror_r instead of the thread unsafe strerror one Arnaldo Carvalho de Melo
2016-03-24  7:32 ` [GIT PULL 00/23] perf/core improvements and fixes Ingo Molnar

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=1458767880-3288-22-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.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.