Commit 4fc472f1 authored by Valentin Schneider's avatar Valentin Schneider Committed by Peter Zijlstra

sched/topology: Move SD_DEGENERATE_GROUPS_MASK out of linux/sched/topology.h

SD_DEGENERATE_GROUPS_MASK is only useful for sched/topology.c, but still
gets defined for anyone who imports topology.h, leading to a flurry of
unused variable warnings.

Move it out of the header and place it next to the SD degeneration
functions in sched/topology.c.

Fixes: 4ee4ea44 ("sched/topology: Introduce SD metaflag for flags needing > 1 groups")
Reported-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarValentin Schneider <valentin.schneider@arm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200825133216.9163-2-valentin.schneider@arm.com
parent 8fca9494
...@@ -25,13 +25,6 @@ enum { ...@@ -25,13 +25,6 @@ enum {
}; };
#undef SD_FLAG #undef SD_FLAG
/* Generate a mask of SD flags with the SDF_NEEDS_GROUPS metaflag */
#define SD_FLAG(name, mflags) (name * !!((mflags) & SDF_NEEDS_GROUPS)) |
static const unsigned int SD_DEGENERATE_GROUPS_MASK =
#include <linux/sched/sd_flags.h>
0;
#undef SD_FLAG
#ifdef CONFIG_SCHED_DEBUG #ifdef CONFIG_SCHED_DEBUG
struct sd_flag_debug { struct sd_flag_debug {
......
...@@ -154,6 +154,13 @@ static inline bool sched_debug(void) ...@@ -154,6 +154,13 @@ static inline bool sched_debug(void)
} }
#endif /* CONFIG_SCHED_DEBUG */ #endif /* CONFIG_SCHED_DEBUG */
/* Generate a mask of SD flags with the SDF_NEEDS_GROUPS metaflag */
#define SD_FLAG(name, mflags) (name * !!((mflags) & SDF_NEEDS_GROUPS)) |
static const unsigned int SD_DEGENERATE_GROUPS_MASK =
#include <linux/sched/sd_flags.h>
0;
#undef SD_FLAG
static int sd_degenerate(struct sched_domain *sd) static int sd_degenerate(struct sched_domain *sd)
{ {
if (cpumask_weight(sched_domain_span(sd)) == 1) if (cpumask_weight(sched_domain_span(sd)) == 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment