Skip to content

Commit

Permalink
profiling: remove stale percpu flip buffer variables
Browse files Browse the repository at this point in the history
For some reason I didn't see this issue on my arm64 or x86-64 builds,
but Stephen Rothwell reports that commit 2accfdb ("profiling:
attempt to remove per-cpu profile flip buffer") left these static
variables around, and the powerpc build is unhappy about them:

  kernel/profile.c:52:28: warning: 'cpu_profile_flip' defined but not used [-Wunused-variable]
     52 | static DEFINE_PER_CPU(int, cpu_profile_flip);
        |                            ^~~~~~~~~~~~~~~~
  ..

So remove these stale left-over remnants too.

Fixes: 2accfdb ("profiling: attempt to remove per-cpu profile flip buffer")
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Jul 29, 2024
1 parent 6b5faec commit 94ede2a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ static unsigned short int prof_shift;
int prof_on __read_mostly;
EXPORT_SYMBOL_GPL(prof_on);

#if defined(CONFIG_SMP) && defined(CONFIG_PROC_FS)
static DEFINE_PER_CPU(struct profile_hit *[2], cpu_profile_hits);
static DEFINE_PER_CPU(int, cpu_profile_flip);
static DEFINE_MUTEX(profile_flip_mutex);
#endif /* CONFIG_SMP */

int profile_setup(char *str)
{
static const char schedstr[] = "schedule";
Expand Down

0 comments on commit 94ede2a

Please sign in to comment.