From: David Gibson This patch squashes a handful of assorted sparse warnings in the ppc64 code. Should be pretty much trivial and self explanatory. Signed-off-by: David Gibson Signed-off-by: Andrew Morton --- 25-akpm/arch/ppc64/kernel/nvram.c | 4 ++-- 25-akpm/arch/ppc64/kernel/setup.c | 2 +- 25-akpm/arch/ppc64/mm/hash_utils.c | 2 +- 25-akpm/arch/ppc64/mm/hugetlbpage.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff -puN arch/ppc64/kernel/nvram.c~ppc64-trivial-sparse-cleanups arch/ppc64/kernel/nvram.c --- 25/arch/ppc64/kernel/nvram.c~ppc64-trivial-sparse-cleanups 2004-10-21 20:52:34.956153000 -0700 +++ 25-akpm/arch/ppc64/kernel/nvram.c 2004-10-21 20:52:34.965151632 -0700 @@ -77,7 +77,7 @@ static loff_t dev_nvram_llseek(struct fi } -static ssize_t dev_nvram_read(struct file *file, char *buf, +static ssize_t dev_nvram_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -117,7 +117,7 @@ static ssize_t dev_nvram_read(struct fil } -static ssize_t dev_nvram_write(struct file *file, const char *buf, +static ssize_t dev_nvram_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { ssize_t len; diff -puN arch/ppc64/kernel/setup.c~ppc64-trivial-sparse-cleanups arch/ppc64/kernel/setup.c --- 25/arch/ppc64/kernel/setup.c~ppc64-trivial-sparse-cleanups 2004-10-21 20:52:34.957152848 -0700 +++ 25-akpm/arch/ppc64/kernel/setup.c 2004-10-21 20:52:34.966151480 -0700 @@ -1111,7 +1111,7 @@ static int __init early_xmon(char *p) { /* ensure xmon is enabled */ xmon_init(); - debugger(0); + debugger(NULL); return 0; } diff -puN arch/ppc64/mm/hash_utils.c~ppc64-trivial-sparse-cleanups arch/ppc64/mm/hash_utils.c --- 25/arch/ppc64/mm/hash_utils.c~ppc64-trivial-sparse-cleanups 2004-10-21 20:52:34.959152544 -0700 +++ 25-akpm/arch/ppc64/mm/hash_utils.c 2004-10-21 20:52:34.967151328 -0700 @@ -401,7 +401,7 @@ void low_hash_fault(struct pt_regs *regs info.si_signo = SIGBUS; info.si_errno = 0; info.si_code = BUS_ADRERR; - info.si_addr = (void *)address; + info.si_addr = (void __user *)address; force_sig_info(SIGBUS, &info, current); return; } diff -puN arch/ppc64/mm/hugetlbpage.c~ppc64-trivial-sparse-cleanups arch/ppc64/mm/hugetlbpage.c --- 25/arch/ppc64/mm/hugetlbpage.c~ppc64-trivial-sparse-cleanups 2004-10-21 20:52:34.960152392 -0700 +++ 25-akpm/arch/ppc64/mm/hugetlbpage.c 2004-10-21 20:52:34.966151480 -0700 @@ -249,7 +249,7 @@ int prepare_hugepage_range(unsigned long { if (within_hugepage_high_range(addr, len)) return 0; - else if ((addr < 0x100000000) && ((addr+len) < 0x100000000)) { + else if ((addr < 0x100000000UL) && ((addr+len) < 0x100000000UL)) { int err; /* Yes, we need both tests, in case addr+len overflows * 64-bit arithmetic */ _