* linux-next: build warning after merge of the final tree (tip tree related)
@ 2013-03-12 4:42 Stephen Rothwell
2013-03-12 5:16 ` Li Zefan
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2013-03-12 4:42 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Li Zefan, David S. Miller
[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]
Hi all,
After merging the final tree, today's linux-next build (sparc defconfig)
produced this warning:
In file included from kernel/sched/core.c:85:0:
kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
In file included from kernel/sched/cputime.c:7:0:
kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
In file included from kernel/sched/idle_task.c:1:0:
kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
In file included from kernel/sched/fair.c:35:0:
kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
In file included from kernel/sched/stop_task.c:1:0:
kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
In file included from kernel/sched/rt.c:6:0:
kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
Probably caused by commit c82ba9fa7588 ("sched: Move struct sched_class
to kernel/sched/sched.h") from the tip tree which removed a forward
declaration of "struct sched_domain" from include/linux/sched.h - the
read declaration is protected by CONFIG_SMP (which is not set for this
build).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: build warning after merge of the final tree (tip tree related)
2013-03-12 4:42 linux-next: build warning after merge of the final tree (tip tree related) Stephen Rothwell
@ 2013-03-12 5:16 ` Li Zefan
2013-03-12 5:45 ` Stephen Rothwell
0 siblings, 1 reply; 10+ messages in thread
From: Li Zefan @ 2013-03-12 5:16 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, David S. Miller
On 2013/3/12 12:42, Stephen Rothwell wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (sparc defconfig)
> produced this warning:
>
> In file included from kernel/sched/core.c:85:0:
> kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
> kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> In file included from kernel/sched/cputime.c:7:0:
> kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
> kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> In file included from kernel/sched/idle_task.c:1:0:
> kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
> kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> In file included from kernel/sched/fair.c:35:0:
> kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
> kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> In file included from kernel/sched/stop_task.c:1:0:
> kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
> kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
> In file included from kernel/sched/rt.c:6:0:
> kernel/sched/sched.h:1043:39: warning: 'struct sched_domain' declared inside parameter list [enabled by default]
> kernel/sched/sched.h:1043:39: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
>
> Probably caused by commit c82ba9fa7588 ("sched: Move struct sched_class
> to kernel/sched/sched.h") from the tip tree which removed a forward
> declaration of "struct sched_domain" from include/linux/sched.h - the
> read declaration is protected by CONFIG_SMP (which is not set for this
> build).
>
Should be fixed by this, and it has been queued in tip:sched/core
Commit-ID: b719203b846284e77f5c50fca04b458b6484aeae
Gitweb: http://git.kernel.org/tip/b719203b846284e77f5c50fca04b458b6484aeae
Author: Li Zefan <lizefan@huawei.com>
AuthorDate: Thu, 7 Mar 2013 10:00:26 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 11 Mar 2013 09:07:24 +0100
sched: Fix update_group_power() prototype placement to fix build warning when !CONFIG_SMP
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: build warning after merge of the final tree (tip tree related)
2013-03-12 5:16 ` Li Zefan
@ 2013-03-12 5:45 ` Stephen Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2013-03-12 5:45 UTC (permalink / raw)
To: Li Zefan
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel, David S. Miller
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
Hi,
On Tue, 12 Mar 2013 13:16:21 +0800 Li Zefan <lizefan@huawei.com> wrote:
>
> Should be fixed by this, and it has been queued in tip:sched/core
>
> Commit-ID: b719203b846284e77f5c50fca04b458b6484aeae
> Gitweb: http://git.kernel.org/tip/b719203b846284e77f5c50fca04b458b6484aeae
> Author: Li Zefan <lizefan@huawei.com>
> AuthorDate: Thu, 7 Mar 2013 10:00:26 +0800
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Mon, 11 Mar 2013 09:07:24 +0100
>
> sched: Fix update_group_power() prototype placement to fix build warning when !CONFIG_SMP
Good, thanks.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* linux-next: build warning after merge of the final tree (tip tree related)
@ 2010-10-11 5:04 Stephen Rothwell
2010-10-11 17:09 ` Yinghai Lu
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2010-10-11 5:04 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Yinghai Lu
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
Hi all,
After merging the final tree, today's linux-next build (powerpc
allnoconfig) produced this warning:
WARNING: mm/built-in.o(.text+0x25ab8): Section mismatch in reference from the function memblock_find_base() to the function .init.text:memblock_find_region()
The function memblock_find_base() references
the function __init memblock_find_region().
This is often because memblock_find_base lacks a __init
annotation or the annotation of memblock_find_region is wrong.
Introduced by commit 3661ca66a42e306aaf53246fb75aec1ea01be0f0 ("memblock:
Fix section mismatch warnings").
Sorry, I seem to have missed this before.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: build warning after merge of the final tree (tip tree related)
2010-10-11 5:04 Stephen Rothwell
@ 2010-10-11 17:09 ` Yinghai Lu
2010-10-11 19:00 ` H. Peter Anvin
0 siblings, 1 reply; 10+ messages in thread
From: Yinghai Lu @ 2010-10-11 17:09 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel
On 10/10/2010 10:04 PM, Stephen Rothwell wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (powerpc
> allnoconfig) produced this warning:
>
> WARNING: mm/built-in.o(.text+0x25ab8): Section mismatch in reference from the function memblock_find_base() to the function .init.text:memblock_find_region()
> The function memblock_find_base() references
> the function __init memblock_find_region().
> This is often because memblock_find_base lacks a __init
> annotation or the annotation of memblock_find_region is wrong.
>
> Introduced by commit 3661ca66a42e306aaf53246fb75aec1ea01be0f0 ("memblock:
> Fix section mismatch warnings").
>
please check
[PATCH] x86: Fix section mismatch with memblock_find_region
Stephen found
WARNING: mm/built-in.o(.text+0x25ab8): Section mismatch in reference from the function memblock_find_base() to the function .init.text:memblock_find_region()
The function memblock_find_base() references
the function __init memblock_find_region().
This is often because memblock_find_base lacks a __init
annotation or the annotation of memblock_find_region is wrong.
make all functions in memblock.c without __init to carry __init_memblock.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
mm/memblock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/mm/memblock.c
===================================================================
--- linux-2.6.orig/mm/memblock.c
+++ linux-2.6/mm/memblock.c
@@ -99,7 +99,7 @@ long __init_memblock memblock_overlaps_r
* are top-down.
*/
-static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t end,
+static phys_addr_t __init_memblock memblock_find_region(phys_addr_t start, phys_addr_t end,
phys_addr_t size, phys_addr_t align)
{
phys_addr_t base, res_base;
@@ -653,7 +653,7 @@ void __init memblock_enforce_memory_limi
}
}
-static int memblock_search(struct memblock_type *type, phys_addr_t addr)
+static int __init_memblock memblock_search(struct memblock_type *type, phys_addr_t addr)
{
unsigned int left = 0, right = type->cnt;
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: build warning after merge of the final tree (tip tree related)
2010-10-11 17:09 ` Yinghai Lu
@ 2010-10-11 19:00 ` H. Peter Anvin
2010-10-11 19:34 ` Yinghai Lu
0 siblings, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2010-10-11 19:00 UTC (permalink / raw)
To: Yinghai Lu
Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, Peter Zijlstra,
linux-next, linux-kernel
On 10/11/2010 10:09 AM, Yinghai Lu wrote:
>
> make all functions in memblock.c without __init to carry __init_memblock.
>
>
> -static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t end,
> +static phys_addr_t __init_memblock memblock_find_region(phys_addr_t start, phys_addr_t end,
> phys_addr_t size, phys_addr_t align)
>
> -static int memblock_search(struct memblock_type *type, phys_addr_t addr)
> +static int __init_memblock memblock_search(struct memblock_type *type, phys_addr_t addr)
>
Your patch description doesn't match what your patch does. Please write
a correct description.
-hpa
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: build warning after merge of the final tree (tip tree related)
2010-10-11 19:00 ` H. Peter Anvin
@ 2010-10-11 19:34 ` Yinghai Lu
0 siblings, 0 replies; 10+ messages in thread
From: Yinghai Lu @ 2010-10-11 19:34 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Stephen Rothwell, Thomas Gleixner, Ingo Molnar, Peter Zijlstra,
linux-next, linux-kernel
On 10/11/2010 12:00 PM, H. Peter Anvin wrote:
> On 10/11/2010 10:09 AM, Yinghai Lu wrote:
>>
>> make all functions in memblock.c without __init to carry __init_memblock.
>>
>>
>> -static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t end,
>> +static phys_addr_t __init_memblock memblock_find_region(phys_addr_t start, phys_addr_t end,
>> phys_addr_t size, phys_addr_t align)
>>
>> -static int memblock_search(struct memblock_type *type, phys_addr_t addr)
>> +static int __init_memblock memblock_search(struct memblock_type *type, phys_addr_t addr)
>>
>
> Your patch description doesn't match what your patch does. Please write
> a correct description.
please check
[PATCH -v2] x86: Fix section mismatch with memblock_find_region()
Stephen found
WARNING: mm/built-in.o(.text+0x25ab8): Section mismatch in reference from the function memblock_find_base() to the function .init.text:memblock_find_region()
The function memblock_find_base() references
the function __init memblock_find_region().
This is often because memblock_find_base lacks a __init
annotation or the annotation of memblock_find_region is wrong.
So let memblock_find_region() to use __init_memblock insteaf of __init directly.
Also make left function that doesn't have __init* to carry __init_memblock.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
mm/memblock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/mm/memblock.c
===================================================================
--- linux-2.6.orig/mm/memblock.c
+++ linux-2.6/mm/memblock.c
@@ -99,7 +99,7 @@ long __init_memblock memblock_overlaps_r
* are top-down.
*/
-static phys_addr_t __init memblock_find_region(phys_addr_t start, phys_addr_t end,
+static phys_addr_t __init_memblock memblock_find_region(phys_addr_t start, phys_addr_t end,
phys_addr_t size, phys_addr_t align)
{
phys_addr_t base, res_base;
@@ -653,7 +653,7 @@ void __init memblock_enforce_memory_limi
}
}
-static int memblock_search(struct memblock_type *type, phys_addr_t addr)
+static int __init_memblock memblock_search(struct memblock_type *type, phys_addr_t addr)
{
unsigned int left = 0, right = type->cnt;
^ permalink raw reply [flat|nested] 10+ messages in thread
* linux-next: build warning after merge of the final tree (tip tree related)
@ 2010-04-15 4:36 Stephen Rothwell
2010-04-15 5:29 ` Mike Galbraith
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2010-04-15 4:36 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Mike Galbraith
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
Hi all,
After merging the final tree, today's linux-next build (powerpc
allnoconfig) produced this warning:
kernel/sched.c:1875: warning: 'update_avg' defined but not used
Introduced by commit e12f31d3e5d36328c7fbd0fce40a95e70b59152c ("sched:
Remove avg_overlap") which left the only call to this function protected
by CONFIG_SMP.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: build warning after merge of the final tree (tip tree related)
2010-04-15 4:36 Stephen Rothwell
@ 2010-04-15 5:29 ` Mike Galbraith
2010-04-15 6:17 ` Stephen Rothwell
0 siblings, 1 reply; 10+ messages in thread
From: Mike Galbraith @ 2010-04-15 5:29 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel
On Thu, 2010-04-15 at 14:36 +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (powerpc
> allnoconfig) produced this warning:
>
> kernel/sched.c:1875: warning: 'update_avg' defined but not used
>
> Introduced by commit e12f31d3e5d36328c7fbd0fce40a95e70b59152c ("sched:
> Remove avg_overlap") which left the only call to this function protected
> by CONFIG_SMP.
Oops.
sched: fix UP update_avg() build warning.
update_avg() is only used for SMP builds, move it to the nearest SMP block.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
diff --git a/kernel/sched.c b/kernel/sched.c
index 3acf694..95eaecc 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1872,12 +1872,6 @@ static void set_load_weight(struct task_struct *p)
p->se.load.inv_weight = prio_to_wmult[p->static_prio - MAX_RT_PRIO];
}
-static void update_avg(u64 *avg, u64 sample)
-{
- s64 diff = sample - *avg;
- *avg += diff >> 3;
-}
-
static void enqueue_task(struct rq *rq, struct task_struct *p, int flags)
{
update_rq_clock(rq);
@@ -2289,6 +2283,12 @@ int select_task_rq(struct rq *rq, struct task_struct *p, int sd_flags, int wake_
return cpu;
}
+
+static void update_avg(u64 *avg, u64 sample)
+{
+ s64 diff = sample - *avg;
+ *avg += diff >> 3;
+}
#endif
/***
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: linux-next: build warning after merge of the final tree (tip tree related)
2010-04-15 5:29 ` Mike Galbraith
@ 2010-04-15 6:17 ` Stephen Rothwell
0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2010-04-15 6:17 UTC (permalink / raw)
To: Mike Galbraith
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
Hi Mike,
On Thu, 15 Apr 2010 07:29:59 +0200 Mike Galbraith <efault@gmx.de> wrote:
>
> Oops.
>
> sched: fix UP update_avg() build warning.
>
> update_avg() is only used for SMP builds, move it to the nearest SMP block.
Thanks.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-03-12 5:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-12 4:42 linux-next: build warning after merge of the final tree (tip tree related) Stephen Rothwell
2013-03-12 5:16 ` Li Zefan
2013-03-12 5:45 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2010-10-11 5:04 Stephen Rothwell
2010-10-11 17:09 ` Yinghai Lu
2010-10-11 19:00 ` H. Peter Anvin
2010-10-11 19:34 ` Yinghai Lu
2010-04-15 4:36 Stephen Rothwell
2010-04-15 5:29 ` Mike Galbraith
2010-04-15 6:17 ` Stephen Rothwell
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).