Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

asm-m32r/uaccess.h must #include <asm/setup.h>

This patch fixes the following compile error caused by
commit 4016a1390d07f15b267eecb20e76a48fd5c524ef
(mm/nommu.c: return 0 from kobjsize with invalid objects):

/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c: In function 'kobjsize':
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c:112: error: 'memory_end' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c:112: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/git/linux-2.6/mm/nommu.c:112: error: for each function it appears in.)

The patch also removes now no longer required memory_{start,end}
declarations inside access_ok().

Reported-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Adrian Bunk and committed by
Linus Torvalds
ec0ced15 9bb91784

+1 -1
+1 -1
include/asm-m32r/uaccess.h
··· 14 14 #include <linux/errno.h> 15 15 #include <linux/thread_info.h> 16 16 #include <asm/page.h> 17 + #include <asm/setup.h> 17 18 18 19 #define VERIFY_READ 0 19 20 #define VERIFY_WRITE 1 ··· 107 106 #else 108 107 static inline int access_ok(int type, const void *addr, unsigned long size) 109 108 { 110 - extern unsigned long memory_start, memory_end; 111 109 unsigned long val = (unsigned long)addr; 112 110 113 111 return ((val >= memory_start) && ((val + size) < memory_end));