All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/numa: fix build without CONFIG_NUMA_BALANCING
@ 2017-06-28 20:05 Arnd Bergmann
  2017-06-28 20:40 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-06-28 20:05 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra
  Cc: Arnd Bergmann, Vincent Guittot, Morten Rasmussen,
	Dietmar Eggemann, Rik van Riel, linux-kernel

I ran into a build error:

kernel/sched/fair.c:2655:44: error: 'struct sched_domain' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]

Adding a forward declaration for the struct name is sufficient
to avoid it.

Fixes: 3fed382b46ba ("sched/numa: Implement NUMA node level wake_affine()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/sched/fair.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6f4f155adf5f..eea8f0b7d9c0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2652,6 +2652,7 @@ static inline void account_numa_dequeue(struct rq *rq, struct task_struct *p)
 {
 }
 
+struct sched_domain;
 static inline bool numa_wake_affine(struct sched_domain *sd,
 				    struct task_struct *p, int this_cpu,
 				    int prev_cpu, int sync)
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sched/numa: fix build without CONFIG_NUMA_BALANCING
  2017-06-28 20:05 [PATCH] sched/numa: fix build without CONFIG_NUMA_BALANCING Arnd Bergmann
@ 2017-06-28 20:40 ` Rik van Riel
  0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2017-06-28 20:40 UTC (permalink / raw)
  To: Arnd Bergmann, Ingo Molnar, Peter Zijlstra
  Cc: Vincent Guittot, Morten Rasmussen, Dietmar Eggemann, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

On Wed, 2017-06-28 at 22:05 +0200, Arnd Bergmann wrote:
> I ran into a build error:
> 
> kernel/sched/fair.c:2655:44: error: 'struct sched_domain' declared
> inside parameter list will not be visible outside of this definition
> or declaration [-Werror]
> 
> Adding a forward declaration for the struct name is sufficient
> to avoid it.
> 
> Fixes: 3fed382b46ba ("sched/numa: Implement NUMA node level
> wake_affine()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Peter pointed out another problem with that patch.

I am running a few tests now on a kernel with that
other bug fixed, which should also magically get
rid of this compiler warning.

-- 
All rights reversed

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-28 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 20:05 [PATCH] sched/numa: fix build without CONFIG_NUMA_BALANCING Arnd Bergmann
2017-06-28 20:40 ` Rik van Riel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.