linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Valentin Schneider <valentin.schneider@arm.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
	peterz@infradead.org, vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, morten.rasmussen@arm.com
Subject: Re: [PATCH 2/2] sched/topology: Move SD_DEGENERATE_GROUPS_MASK out of linux/sched/topology.h
Date: Wed, 26 Aug 2020 17:24:08 +0300	[thread overview]
Message-ID: <20200826142408.GO1891694@smile.fi.intel.com> (raw)
In-Reply-To: <20200825133216.9163-2-valentin.schneider@arm.com>

On Tue, Aug 25, 2020 at 02:32:16PM +0100, Valentin Schneider wrote:
> 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.

Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Fixes: 4ee4ea443a5d ("sched/topology: Introduce SD metaflag for flags needing > 1 groups")
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
> ---
>  include/linux/sched/topology.h | 7 -------
>  kernel/sched/topology.c        | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
> index b9b0dab4d067..9ef7bf686a9f 100644
> --- a/include/linux/sched/topology.h
> +++ b/include/linux/sched/topology.h
> @@ -25,13 +25,6 @@ enum {
>  };
>  #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
>  
>  struct sd_flag_debug {
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index 4e1260cb4b44..da3cd60e4b78 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -154,6 +154,13 @@ static inline bool sched_debug(void)
>  }
>  #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)
>  {
>  	if (cpumask_weight(sched_domain_span(sd)) == 1)
> -- 
> 2.27.0
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2020-08-26 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 13:32 [PATCH 1/2] sched/topology: Move sd_flag_debug out of linux/sched/topology.h Valentin Schneider
2020-08-25 13:32 ` [PATCH 2/2] sched/topology: Move SD_DEGENERATE_GROUPS_MASK " Valentin Schneider
2020-08-26 14:24   ` Andy Shevchenko [this message]
2020-08-27  7:54   ` [tip: sched/core] " tip-bot2 for Valentin Schneider
2020-08-26 14:25 ` [PATCH 1/2] sched/topology: Move sd_flag_debug " Andy Shevchenko
2020-08-27  7:54 ` [tip: sched/core] " tip-bot2 for Valentin Schneider
2020-08-27  8:50   ` Andy Shevchenko
2020-08-27  9:27     ` peterz
2020-08-27  9:57       ` Andy Shevchenko

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=20200826142408.GO1891694@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.org \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    /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).