From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934978AbbLRIvP (ORCPT ); Fri, 18 Dec 2015 03:51:15 -0500 Received: from terminus.zytor.com ([198.137.202.10]:51883 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932311AbbLRIvL (ORCPT ); Fri, 18 Dec 2015 03:51:11 -0500 Date: Fri, 18 Dec 2015 00:50:35 -0800 From: tip-bot for Josh Poimboeuf Message-ID: Cc: jolsa@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, namhyung@kernel.org, acme@redhat.com, peterz@infradead.org, tglx@linutronix.de, mingo@kernel.org Reply-To: jolsa@redhat.com, hpa@zytor.com, peterz@infradead.org, tglx@linutronix.de, acme@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, namhyung@kernel.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Convert parse-options.c internal functions to static Git-Commit-ID: 408cf34c176e1832bc2f9f68033a55a765484f93 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 408cf34c176e1832bc2f9f68033a55a765484f93 Gitweb: http://git.kernel.org/tip/408cf34c176e1832bc2f9f68033a55a765484f93 Author: Josh Poimboeuf AuthorDate: Sun, 13 Dec 2015 22:18:12 -0600 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 14 Dec 2015 12:33:01 -0300 perf tools: Convert parse-options.c internal functions to static Signed-off-by: Josh Poimboeuf Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/c027b5f47ec1055077f5650edb1c7ad37c191e6c.1449965119.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- 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 de3290b..14b2bee 100644 --- a/tools/perf/util/parse-options.c +++ b/tools/perf/util/parse-options.c @@ -360,8 +360,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; @@ -378,9 +378,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; @@ -489,7 +489,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; @@ -717,9 +717,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 a8e407b..dd1236d 100644 --- a/tools/perf/util/parse-options.h +++ b/tools/perf/util/parse-options.h @@ -195,15 +195,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);