[PPC64] Trivial sparse cleanups
David Gibson
david at gibson.dropbear.id.au
Thu Oct 21 11:35:49 EST 2004
Andrew, please apply:
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 <david at gibson.dropbear.id.au>
Index: working-2.6/arch/ppc64/kernel/nvram.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/nvram.c 2004-09-24 10:14:09.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/nvram.c 2004-10-21 11:34:39.057902952 +1000
@@ -77,7 +77,7 @@
}
-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_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;
Index: working-2.6/arch/ppc64/kernel/setup.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/setup.c 2004-10-05 10:08:10.000000000 +1000
+++ working-2.6/arch/ppc64/kernel/setup.c 2004-10-21 11:34:39.059902648 +1000
@@ -1111,7 +1111,7 @@
{
/* ensure xmon is enabled */
xmon_init();
- debugger(0);
+ debugger(NULL);
return 0;
}
Index: working-2.6/arch/ppc64/mm/hugetlbpage.c
===================================================================
--- working-2.6.orig/arch/ppc64/mm/hugetlbpage.c 2004-10-20 10:52:39.000000000 +1000
+++ working-2.6/arch/ppc64/mm/hugetlbpage.c 2004-10-21 11:34:39.060902496 +1000
@@ -249,7 +249,7 @@
{
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 */
Index: working-2.6/arch/ppc64/mm/hash_utils.c
===================================================================
--- working-2.6.orig/arch/ppc64/mm/hash_utils.c 2004-09-28 10:22:13.000000000 +1000
+++ working-2.6/arch/ppc64/mm/hash_utils.c 2004-10-21 11:34:39.060902496 +1000
@@ -401,7 +401,7 @@
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;
}
--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
More information about the Linuxppc64-dev
mailing list