* [PATCH] perf sched: Make output_name variable static
@ 2026-09-03 11:28 nanshuaibo
2026-09-15 19:43 ` Ian Rogers
0 siblings, 1 reply; 3+ messages in thread
From: nanshuaibo @ 2026-09-03 11:28 UTC (permalink / raw)
To: linux-perf-users
Cc: linux-kernel, nanshuaibo, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark
The output_name variable is only used within builtin-sched.c for the
stats subcommand, so declare it static. This fixes a sparse warning:
builtin-sched.c:4140:12: warning: symbol 'output_name' was not
declared. Should it be static?
Signed-off-by: nanshuaibo <nanshuaibo811@163.com>
---
tools/perf/builtin-sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index dd39a4fb..22486df2 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -4137,7 +4137,7 @@ static int disable_sched_schedstat(void)
}
/* perf.data or any other output file name used by stats subcommand (only). */
-const char *output_name;
+static const char *output_name;
static int perf_sched__schedstat_record(struct perf_sched *sched,
int argc, const char **argv)
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf sched: Make output_name variable static
2026-09-03 11:28 [PATCH] perf sched: Make output_name variable static nanshuaibo
@ 2026-09-15 19:43 ` Ian Rogers
2026-09-25 13:13 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 3+ messages in thread
From: Ian Rogers @ 2026-09-15 19:43 UTC (permalink / raw)
To: nanshuaibo
Cc: linux-perf-users, linux-kernel, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark
On Thu, Sep 3, 2026 at 4:28 AM nanshuaibo <nanshuaibo811@163.com> wrote:
>
> The output_name variable is only used within builtin-sched.c for the
> stats subcommand, so declare it static. This fixes a sparse warning:
>
> builtin-sched.c:4140:12: warning: symbol 'output_name' was not
> declared. Should it be static?
>
> Signed-off-by: nanshuaibo <nanshuaibo811@163.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Thanks!
Ian
> ---
> tools/perf/builtin-sched.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index dd39a4fb..22486df2 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -4137,7 +4137,7 @@ static int disable_sched_schedstat(void)
> }
>
> /* perf.data or any other output file name used by stats subcommand (only). */
> -const char *output_name;
> +static const char *output_name;
>
> static int perf_sched__schedstat_record(struct perf_sched *sched,
> int argc, const char **argv)
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perf sched: Make output_name variable static
2026-09-15 19:43 ` Ian Rogers
@ 2026-09-25 13:13 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-09-25 13:13 UTC (permalink / raw)
To: Ian Rogers
Cc: nanshuaibo, linux-perf-users, linux-kernel, Peter Zijlstra,
Ingo Molnar, Namhyung Kim, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Adrian Hunter, James Clark
On Tue, Sep 15, 2026 at 12:43:59PM -0700, Ian Rogers wrote:
> On Thu, Sep 3, 2026 at 4:28 AM nanshuaibo <nanshuaibo811@163.com> wrote:
> >
> > The output_name variable is only used within builtin-sched.c for the
> > stats subcommand, so declare it static. This fixes a sparse warning:
> >
> > builtin-sched.c:4140:12: warning: symbol 'output_name' was not
> > declared. Should it be static?
> >
> > Signed-off-by: nanshuaibo <nanshuaibo811@163.com>
>
> Reviewed-by: Ian Rogers <irogers@google.com>
Thanks, applied to perf-tools-next, for v7.4.
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-25 13:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 11:28 [PATCH] perf sched: Make output_name variable static nanshuaibo
2026-09-15 19:43 ` Ian Rogers
2026-09-25 13:13 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®