From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-kernel@lists.codethink.co.uk
Cc: Ben Dooks <ben.dooks@codethink.co.uk>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org
Subject: [PATCH] arm: topology: only build cpu_corepower_mask if needed
Date: Fri, 11 Oct 2019 17:41:42 +0100 [thread overview]
Message-ID: <20191011164142.659-1-ben.dooks@codethink.co.uk> (raw)
The cpu_corepower_mask() is only needed if CONFIG_SCHED_MC is
enabled, so remove the warning about it not being used by
ifdef-ing it out.
fixes the following build warning:
arch/arm/kernel/topology.c:184:30: warning: ‘cpu_corepower_mask’ defined but not used [-Wunused-function]
184 | static const struct cpumask *cpu_corepower_mask(int cpu)
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
KernelVersion: 5.4-rc3
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-kernel@vger.kernel.org
---
arch/arm/kernel/topology.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 05d4223d5493..61f9a28f4bfb 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -177,6 +177,7 @@ static inline void parse_dt_topology(void) {}
static inline void update_cpu_capacity(unsigned int cpuid) {}
#endif
+#ifdef CONFIG_SCHED_MC
/*
* The current assumption is that we can power gate each core independently.
* This will be superseded by DT binding once available.
@@ -185,6 +186,7 @@ static const struct cpumask *cpu_corepower_mask(int cpu)
{
return &cpu_topology[cpu].thread_sibling;
}
+#endif
/*
* store_cpu_topology is called at boot when only one cpu is running
--
2.23.0
reply other threads:[~2019-10-11 16:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191011164142.659-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/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
all inboxes | Powered by JetHome®