All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH v3 12/17] perf: Convert parse-options.c internal functions to static
Date: Sun, 13 Dec 2015 22:18:12 -0600	[thread overview]
Message-ID: <c027b5f47ec1055077f5650edb1c7ad37c191e6c.1449965119.git.jpoimboe@redhat.com> (raw)
In-Reply-To: <cover.1449965119.git.jpoimboe@redhat.com>

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/perf/util/parse-options.c | 18 +++++++++---------
 tools/perf/util/parse-options.h |  9 ---------
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c
index 00a03a9..ac49525 100644
--- a/tools/perf/util/parse-options.c
+++ b/tools/perf/util/parse-options.c
@@ -367,8 +367,8 @@ static void check_typos(const char *arg, const struct option *options)
 	}
 }
 
-void parse_options_start(struct parse_opt_ctx_t *ctx,
-			 int argc, const char **argv, int flags)
+static void parse_options_start(struct parse_opt_ctx_t *ctx,
+				int argc, const char **argv, int flags)
 {
 	memset(ctx, 0, sizeof(*ctx));
 	ctx->argc = argc - 1;
@@ -385,9 +385,9 @@ static int usage_with_options_internal(const char * const *,
 				       const struct option *, int,
 				       struct parse_opt_ctx_t *);
 
-int parse_options_step(struct parse_opt_ctx_t *ctx,
-		       const struct option *options,
-		       const char * const usagestr[])
+static int parse_options_step(struct parse_opt_ctx_t *ctx,
+			      const struct option *options,
+			      const char * const usagestr[])
 {
 	int internal_help = !(ctx->flags & PARSE_OPT_NO_INTERNAL_HELP);
 	int excl_short_opt = 1;
@@ -496,7 +496,7 @@ exclusive:
 	return PARSE_OPT_HELP;
 }
 
-int parse_options_end(struct parse_opt_ctx_t *ctx)
+static int parse_options_end(struct parse_opt_ctx_t *ctx)
 {
 	memmove(ctx->out + ctx->cpidx, ctx->argv, ctx->argc * sizeof(*ctx->out));
 	ctx->out[ctx->cpidx + ctx->argc] = NULL;
@@ -725,9 +725,9 @@ static bool option__in_argv(const struct option *opt, const struct parse_opt_ctx
 	return false;
 }
 
-int usage_with_options_internal(const char * const *usagestr,
-				const struct option *opts, int full,
-				struct parse_opt_ctx_t *ctx)
+static int usage_with_options_internal(const char * const *usagestr,
+				       const struct option *opts, int full,
+				       struct parse_opt_ctx_t *ctx)
 {
 	struct option *ordered;
 
diff --git a/tools/perf/util/parse-options.h b/tools/perf/util/parse-options.h
index 2c7ee90..b04190a 100644
--- a/tools/perf/util/parse-options.h
+++ b/tools/perf/util/parse-options.h
@@ -197,15 +197,6 @@ extern int parse_options_usage(const char * const *usagestr,
 			       const char *optstr,
 			       bool short_opt);
 
-extern void parse_options_start(struct parse_opt_ctx_t *ctx,
-				int argc, const char **argv, int flags);
-
-extern int parse_options_step(struct parse_opt_ctx_t *ctx,
-			      const struct option *options,
-			      const char * const usagestr[]);
-
-extern int parse_options_end(struct parse_opt_ctx_t *ctx);
-
 
 /*----- some often used options -----*/
 extern int parse_opt_abbrev_cb(const struct option *, const char *, int);
-- 
2.4.3


  parent reply	other threads:[~2015-12-14  4:21 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14  4:18 [PATCH v3 00/17] perf tools: Move perf subcommand framework to a library Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 01/17] perf build: Remove unnecessary line in Makefile.feature Josh Poimboeuf
2015-12-14 10:05   ` Jiri Olsa
2015-12-14 15:16     ` Arnaldo Carvalho de Melo
2015-12-18  8:47   ` [tip:perf/core] " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 02/17] tools build: Fix feature Makefile dependencies for 'O=' Josh Poimboeuf
2015-12-14 10:08   ` Jiri Olsa
2015-12-14 14:02     ` Josh Poimboeuf
2015-12-14 14:29       ` [PATCH v3.1 " Josh Poimboeuf
2015-12-14 15:16         ` Arnaldo Carvalho de Melo
2015-12-14 15:29         ` Jiri Olsa
2015-12-14 15:38           ` Josh Poimboeuf
2015-12-14 15:55             ` Jiri Olsa
2015-12-14 16:03               ` Josh Poimboeuf
2015-12-14 18:32               ` [PATCH v3.2] tools build: Fix feature Makefile issues with 'O=' Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 03/17] perf test: Add Build file to dependencies for llvm-src-*.c Josh Poimboeuf
2015-12-14 10:10   ` Jiri Olsa
2015-12-14 15:17     ` Arnaldo Carvalho de Melo
2015-12-18  8:47   ` [tip:perf/core] " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 04/17] perf test: remove tarpkg at end of test Josh Poimboeuf
2015-12-18  8:48   ` [tip:perf/core] perf test: Remove " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 05/17] perf build: Fix 'make clean' Josh Poimboeuf
2015-12-14 10:14   ` Jiri Olsa
2015-12-14 15:18     ` Arnaldo Carvalho de Melo
2015-12-18  8:48   ` [tip:perf/core] " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 06/17] perf build: Rename LIB_PATH -> API_PATH Josh Poimboeuf
2015-12-14 10:34   ` Jiri Olsa
2015-12-14 15:19     ` Arnaldo Carvalho de Melo
2015-12-18  8:49   ` [tip:perf/core] " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 07/17] perf: Create pager.h Josh Poimboeuf
2015-12-18  8:49   ` [tip:perf/core] perf tools: " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 08/17] perf: Remove check for unused PERF_PAGER_IN_USE Josh Poimboeuf
2015-12-18  8:49   ` [tip:perf/core] perf tools: " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 09/17] perf: Move help_unknown_cmd() to its own file Josh Poimboeuf
2015-12-18  8:50   ` [tip:perf/core] perf tools: " tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 10/17] perf: Provide subcmd configuration at runtime Josh Poimboeuf
2015-12-14 10:33   ` Jiri Olsa
2015-12-14 14:06     ` Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 11/17] perf: Remove 'perf' from subcmd function and variable names Josh Poimboeuf
2015-12-14  4:18 ` Josh Poimboeuf [this message]
2015-12-18  8:50   ` [tip:perf/core] perf tools: Convert parse-options.c internal functions to static tip-bot for Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 13/17] perf: Document the fact that parse_options*() may exit Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 14/17] perf: Remove subcmd dependencies on strbuf Josh Poimboeuf
2015-12-14 10:25   ` Jiri Olsa
2015-12-14 14:11     ` Josh Poimboeuf
2015-12-14 15:44   ` Arnaldo Carvalho de Melo
2015-12-14 16:05     ` Josh Poimboeuf
2015-12-14 17:50       ` Arnaldo Carvalho de Melo
2015-12-14 18:04         ` Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 15/17] perf: Finalize subcmd independence Josh Poimboeuf
2015-12-14 10:32   ` Jiri Olsa
2015-12-14 14:13     ` Josh Poimboeuf
2015-12-14 15:27       ` Jiri Olsa
2015-12-14 15:51       ` Arnaldo Carvalho de Melo
2015-12-14  4:18 ` [PATCH v3 16/17] perf subcmd: Create subcmd library Josh Poimboeuf
2015-12-14  4:18 ` [PATCH v3 17/17] tools subcmd: Rename subcmd header include guards Josh Poimboeuf

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=c027b5f47ec1055077f5650edb1c7ad37c191e6c.1449965119.git.jpoimboe@redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 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.