Commit 9da1f558 authored by David Gibson's avatar David Gibson Committed by Linus Torvalds

[PATCH] ppc64: trivial sparse cleanups

This patch squashes a handful of assorted sparse warnings in the ppc64
code.  Should be pretty much trivial and self explanatory.
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Acked-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 52ceb2f1
......@@ -77,7 +77,7 @@ static loff_t dev_nvram_llseek(struct file *file, loff_t offset, int origin)
}
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 file *file, char *buf,
}
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;
......
......@@ -1301,7 +1301,7 @@ static int __init early_xmon(char *p)
{
/* ensure xmon is enabled */
xmon_init();
debugger(0);
debugger(NULL);
return 0;
}
......
......@@ -401,7 +401,7 @@ void low_hash_fault(struct pt_regs *regs, unsigned long address)
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;
}
......
......@@ -249,7 +249,7 @@ int prepare_hugepage_range(unsigned long addr, unsigned long len)
{
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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment