Revision 45b35a5ced474b9fbbbfcfd5cf346c432d28d9fd authored by Ralf Baechle on 08 June 2006, 07:43:41 UTC, committed by Linus Torvalds on 08 June 2006, 22:12:21 UTC
From: Ralf Baechle <ralf@linux-mips.org>

<linux/mempolicy.h> uses struct mm_struct and relies on a definition or
declaration somehow magically being dragged in which may result in a
build:

[...]
  CC      mm/mempolicy.o
In file included from mm/mempolicy.c:69:
include/linux/mempolicy.h:150: warning: ‘struct mm_struct’ declared inside parameter list
include/linux/mempolicy.h:150: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/mempolicy.h:175: warning: ‘struct mm_struct’ declared inside parameter list
mm/mempolicy.c:622: error: conflicting types for ‘do_migrate_pages’
include/linux/mempolicy.h:175: error: previous declaration of ‘do_migrate_pages’ was here
mm/mempolicy.c:1661: error: conflicting types for ‘mpol_rebind_mm’
include/linux/mempolicy.h:150: error: previous declaration of ‘mpol_rebind_mm’ was here
make[1]: *** [mm/mempolicy.o] Error 1
make: *** [mm] Error 2
[ralf@denk linux-ip35]$

Including <linux/sched.h> is a step into direction of include hell so
fixed by adding a forward declaration of struct mm_struct instead.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent fd0a0ac
History
File Mode Size
Kconfig -rw-r--r-- 1.1 KB
Kconfig.iosched -rw-r--r-- 1.9 KB
Makefile -rw-r--r-- 333 bytes
as-iosched.c -rw-r--r-- 45.6 KB
blktrace.c -rw-r--r-- 11.8 KB
cfq-iosched.c -rw-r--r-- 58.9 KB
deadline-iosched.c -rw-r--r-- 19.0 KB
elevator.c -rw-r--r-- 20.1 KB
genhd.c -rw-r--r-- 16.7 KB
ioctl.c -rw-r--r-- 7.4 KB
ll_rw_blk.c -rw-r--r-- 99.1 KB
noop-iosched.c -rw-r--r-- 2.6 KB
scsi_ioctl.c -rw-r--r-- 16.4 KB

back to top