From: tip-bot for Thiago Farina <tfransosi@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, acme@redhat.com,
hpa@zytor.com, mingo@redhat.com, a.p.zijlstra@chello.nl,
tfransosi@gmail.com, fweisbec@gmail.com, tglx@linutronix.de,
mhiramat@redhat.com, mingo@elte.hu
Subject: [tip:perf/core] tools/perf/perf.c: Clean up trivial style issues
Date: Fri, 29 Jan 2010 09:39:32 GMT [thread overview]
Message-ID: <tip-4c574159d03f4d8a136a7adff2d0b1d82cadcb18@git.kernel.org> (raw)
In-Reply-To: <1264633557-17597-7-git-send-email-acme@infradead.org>
Commit-ID: 4c574159d03f4d8a136a7adff2d0b1d82cadcb18
Gitweb: http://git.kernel.org/tip/4c574159d03f4d8a136a7adff2d0b1d82cadcb18
Author: Thiago Farina <tfransosi@gmail.com>
AuthorDate: Wed, 27 Jan 2010 21:05:55 -0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 29 Jan 2010 10:36:35 +0100
tools/perf/perf.c: Clean up trivial style issues
Checked with:
./../scripts/checkpatch.pl --terse --file perf.c
perf.c: 51: ERROR: open brace '{' following function declarations go on the next line
perf.c: 73: ERROR: "foo*** bar" should be "foo ***bar"
perf.c:112: ERROR: space prohibited before that close parenthesis ')'
perf.c:127: ERROR: space prohibited before that close parenthesis ')'
perf.c:171: ERROR: "foo** bar" should be "foo **bar"
perf.c:213: ERROR: "(foo*)" should be "(foo *)"
perf.c:216: ERROR: "(foo*)" should be "(foo *)"
perf.c:217: ERROR: space required before that '*' (ctx:OxV)
perf.c:452: ERROR: do not initialise statics to 0 or NULL
perf.c:453: ERROR: do not initialise statics to 0 or NULL
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <1264633557-17597-7-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/perf.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 05c861c..109b89b 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -48,7 +48,8 @@ int check_pager_config(const char *cmd)
return c.val;
}
-static void commit_pager_choice(void) {
+static void commit_pager_choice(void)
+{
switch (use_pager) {
case 0:
setenv("PERF_PAGER", "cat", 1);
@@ -70,7 +71,7 @@ static void set_debugfs_path(void)
"tracing/events");
}
-static int handle_options(const char*** argv, int* argc, int* envchanged)
+static int handle_options(const char ***argv, int *argc, int *envchanged)
{
int handled = 0;
@@ -109,7 +110,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
*envchanged = 1;
} else if (!strcmp(cmd, "--perf-dir")) {
if (*argc < 2) {
- fprintf(stderr, "No directory given for --perf-dir.\n" );
+ fprintf(stderr, "No directory given for --perf-dir.\n");
usage(perf_usage_string);
}
setenv(PERF_DIR_ENVIRONMENT, (*argv)[1], 1);
@@ -124,7 +125,7 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
*envchanged = 1;
} else if (!strcmp(cmd, "--work-tree")) {
if (*argc < 2) {
- fprintf(stderr, "No directory given for --work-tree.\n" );
+ fprintf(stderr, "No directory given for --work-tree.\n");
usage(perf_usage_string);
}
setenv(PERF_WORK_TREE_ENVIRONMENT, (*argv)[1], 1);
@@ -168,7 +169,7 @@ static int handle_alias(int *argcp, const char ***argv)
{
int envchanged = 0, ret = 0, saved_errno = errno;
int count, option_count;
- const char** new_argv;
+ const char **new_argv;
const char *alias_command;
char *alias_string;
@@ -210,11 +211,11 @@ static int handle_alias(int *argcp, const char ***argv)
if (!strcmp(alias_command, new_argv[0]))
die("recursive alias: %s", alias_command);
- new_argv = realloc(new_argv, sizeof(char*) *
+ new_argv = realloc(new_argv, sizeof(char *) *
(count + *argcp + 1));
/* insert after command name */
- memcpy(new_argv + count, *argv + 1, sizeof(char*) * *argcp);
- new_argv[count+*argcp] = NULL;
+ memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp);
+ new_argv[count + *argcp] = NULL;
*argv = new_argv;
*argcp += count - 1;
@@ -450,8 +451,8 @@ int main(int argc, const char **argv)
setup_path();
while (1) {
- static int done_help = 0;
- static int was_alias = 0;
+ static int done_help;
+ static int was_alias;
was_alias = run_argv(&argc, &argv);
if (errno != ENOENT)
next prev parent reply other threads:[~2010-01-29 9:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 23:05 [PATCH 1/9] perf top: Exit if specified --vmlinux can't be used Arnaldo Carvalho de Melo
2010-01-27 23:05 ` [PATCH 2/9] perf symbols: Factor out dso__load_vmlinux_path() Arnaldo Carvalho de Melo
2010-01-27 23:05 ` [PATCH 3/9] perf symbols: Split helpers used when creating kernel dso object Arnaldo Carvalho de Melo
2010-01-27 23:05 ` [PATCH 4/9] perf session: Create kernel maps in the constructor Arnaldo Carvalho de Melo
2010-01-27 23:17 ` Masami Hiramatsu
2010-01-27 23:29 ` Arnaldo Carvalho de Melo
2010-01-28 16:28 ` Masami Hiramatsu
2010-01-28 18:29 ` Arnaldo Carvalho de Melo
2010-01-28 20:59 ` Masami Hiramatsu
2010-01-29 0:42 ` Arnaldo Carvalho de Melo
2010-01-29 7:01 ` Masami Hiramatsu
2010-01-27 23:05 ` [PATCH 5/9] perf symbols: Remove perf_session usage in symbols layer Arnaldo Carvalho de Melo
2010-01-27 23:05 ` [PATCH 6/9] perf: Ignore perf-archive temp file Arnaldo Carvalho de Melo
2010-01-29 9:33 ` [tip:perf/core] " tip-bot for John Kacur
2010-01-29 9:39 ` tip-bot for John Kacur
2010-01-27 23:05 ` [PATCH 7/9] tools/perf/perf.c: Clean up trivial style issues Arnaldo Carvalho de Melo
2010-01-29 9:32 ` [tip:perf/core] " tip-bot for Thiago Farina
2010-01-29 9:39 ` tip-bot for Thiago Farina [this message]
2010-01-27 23:05 ` [PATCH 8/9] perf symbols: Fixup vsyscall maps Arnaldo Carvalho de Melo
2010-01-27 23:05 ` [PATCH 9/9] perf symbols: Ditch vdso global variable Arnaldo Carvalho de Melo
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=tip-4c574159d03f4d8a136a7adff2d0b1d82cadcb18@git.kernel.org \
--to=tfransosi@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).