Skip to content

Commit 002439e

Browse files
committed
perf inject: Don't use globals where not needed to
Some variables were global but used in just one function, so move it to where it belongs. Leftover from patch at the beggining of this series. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 61eaa3b commit 002439e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tools/perf/builtin-inject.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,6 @@ static int __cmd_inject(struct perf_inject *inject)
242242
return ret;
243243
}
244244

245-
static const char * const report_usage[] = {
246-
"perf inject [<options>]",
247-
NULL
248-
};
249-
250245
int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
251246
{
252247
struct perf_inject inject = {
@@ -273,14 +268,18 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
273268
"be more verbose (show build ids, etc)"),
274269
OPT_END()
275270
};
271+
const char * const inject_usage[] = {
272+
"perf inject [<options>]",
273+
NULL
274+
};
276275

277-
argc = parse_options(argc, argv, options, report_usage, 0);
276+
argc = parse_options(argc, argv, options, inject_usage, 0);
278277

279278
/*
280279
* Any (unrecognized) arguments left?
281280
*/
282281
if (argc)
283-
usage_with_options(report_usage, options);
282+
usage_with_options(inject_usage, options);
284283

285284
if (symbol__init() < 0)
286285
return -1;

0 commit comments

Comments
 (0)