2012-05-30 12:35:49

by Wu Fengguang

[permalink] [raw]
Subject: kernel/sched/numa.c:103:14: sparse: incorrect type in initializer (different address spaces)

Hi Peter, Ingo, Andrew,

A lot of sparse warnings below.. I'm afraid it's too much noise for you.

Currently the policy is to send email notifications TO the commit
author (Peter) and CC committer (Ingo) iff the current commit triggers
any *new* errors/warnings, but to show all old+new errors/warnings
inside the email body. The first new error/warning will be used as the
email subject.

Depending on your feedback, I can

1) disable sparse check totally, or

2) teach the build test script to show only *new* sparse warnings, or

3) show all old+new sparse warnings for some weeks so that people get
to aware of the potential problems, then shut up and switch to (2)

sparse warnings become a problem because there are over 12000 lines of
them for the current kernel. The false rate is a bit high. Much higher
than the gcc warnings.

Comments are welcome!

Thanks,
Fengguang
---

FYI: there are new gcc/sparse warnings show up in

tree: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git master
head: 1d06e6d35458dc14a43692b34c9cff8430d77af1
commit: b4cdf91668c27a5a6a5a3ed4234756c042dd8288 [25/89] sched/numa: Implement numa balancer
config: i386-allmodconfig (attached as .config)

All related error/warning messages are:

kernel/fork.c:89:5: sparse: symbol 'max_threads' was not declared. Should it be static?
kernel/fork.c:132:13: sparse: symbol 'arch_release_thread_info' was not declared. Should it be static?
kernel/fork.c:243:13: sparse: symbol 'fork_init' was not declared. Should it be static?
kernel/fork.c:1001:9: sparse: incorrect type in assignment (different address spaces)
kernel/fork.c:1001:9: expected struct sighand_struct *sighand
kernel/fork.c:1001:9: got struct sighand_struct [noderef] <asn:4>*<noident>
kernel/fork.c:1118:19: sparse: incorrect type in assignment (different address spaces)
kernel/fork.c:1118:19: expected struct task_struct [noderef] <asn:4>*owner
kernel/fork.c:1118:19: got struct task_struct *p
kernel/fork.c:1127:41: sparse: implicit cast to nocast type
kernel/fork.c:1128:41: sparse: implicit cast to nocast type
kernel/fork.c:1236:42: sparse: implicit cast to nocast type
kernel/fork.c:1237:43: sparse: implicit cast to nocast type
kernel/fork.c:1239:41: sparse: implicit cast to nocast type
kernel/fork.c:1427:32: sparse: incorrect type in assignment (different address spaces)
kernel/fork.c:1427:32: expected struct task_struct [noderef] <asn:4>*real_parent
kernel/fork.c:1427:32: got struct task_struct *
kernel/fork.c:1468:54: sparse: incorrect type in argument 2 (different address spaces)
kernel/fork.c:1468:54: expected struct list_head *head
kernel/fork.c:1468:54: got struct list_head [noderef] <asn:4>*<noident>
kernel/fork.c:1201:27: sparse: dereference of noderef expression
kernel/fork.c:1204:22: sparse: dereference of noderef expression
kernel/fork.c:1525:22: sparse: dereference of noderef expression
include/linux/sched.h:2395:37: sparse: context imbalance in 'coredump_wait' - different lock contexts for basic block
mm/init-mm.c:25:18: sparse: symbol 'init_mm' was not declared. Should it be static?
kernel/sched/core.c:560:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/core.c:1374:17: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/core.c:5327:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/core.c:5334:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:532:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/core.c:5876:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:48:14: sparse: symbol 'normalized_sysctl_sched_latency' was not declared. Should it be static?
kernel/sched/fair.c:67:14: sparse: symbol 'normalized_sysctl_sched_min_granularity' was not declared. Should it be static?
kernel/sched/fair.c:89:14: sparse: symbol 'normalized_sysctl_sched_wakeup_granularity' was not declared. Should it be static?
kernel/sched/sched.h:565:15: sparse: cast removes address space of expression
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:2665:14: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:2745:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:2829:17: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:4686:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:4615:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:4802:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:4876:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:5064:17: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:4787:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:5013:9: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/fair.c:5064:17: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: cast removes address space of expression
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/sched.h:565:15: sparse: incompatible types in comparison expression (different address spaces)
kernel/sched/numa.c:103:14: sparse: incorrect type in initializer (different address spaces)
kernel/sched/numa.c:103:14: expected void const [noderef] <asn:3>*__vpp_verify
kernel/sched/numa.c:103:14: got struct numa_cpu_load *<noident>
kernel/sched/numa.c:136:14: sparse: incorrect type in initializer (different address spaces)
kernel/sched/numa.c:136:14: expected void const [noderef] <asn:3>*__vpp_verify
kernel/sched/numa.c:136:14: got struct numa_cpu_load *<noident>
kernel/sched/numa.c:400:39: sparse: incorrect type in assignment (different address spaces)
kernel/sched/numa.c:400:39: expected struct numa_cpu_load *<noident>
kernel/sched/numa.c:400:39: got struct numa_cpu_load [noderef] <asn:3>*<noident>
kernel/sched/numa.c:433:44: sparse: incorrect type in initializer (different address spaces)
kernel/sched/numa.c:433:44: expected void const [noderef] <asn:3>*__vpp_verify
kernel/sched/numa.c:433:44: got struct numa_cpu_load *<noident>
kernel/sched/numa.c:196:26: sparse: context imbalance in 'lock_ne_nq' - wrong count at exit
kernel/sched/numa.c:221:9: sparse: context imbalance in 'double_lock_nq' - wrong count at exit
kernel/sched/numa.c:231:28: sparse: context imbalance in 'double_unlock_nq' - unexpected unlock
kernel/sched/numa.c:270:9: sparse: context imbalance in 'dequeue_ne' - unexpected unlock


This is an auto and one-shot notification for new warnings.
It's perfectly fine to ignore it if the code is known good.

---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <[email protected]> Intel Corporation


Attachments:
(No filename) (8.27 kB)
0001-sched-numa-Implement-numa-balancer.patch (24.20 kB)
numa.c (14.91 kB)
.config (137.42 kB)
Download all attachments