Patchwork powerpc: Fix warnings introduced by sysfs changes

login
register
mail settings
Submitter Benjamin Herrenschmidt
Date March 25, 2009, 1:51 a.m.
Message ID <20090325015128.C109DDDEFE@ozlabs.org>
Download mbox | patch
Permalink /patch/25037/
State Superseded
Headers show

Comments

Benjamin Herrenschmidt - March 25, 2009, 1:51 a.m.
Rusty's patch to change our sysfs access to various registers
to use smp_call_function_single() introduced a whole bunch of
warnings. This fixes them

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

I've also now fixed my build test tool to report warnings properly
so hopefully I won't miss that next time around :-)

 arch/powerpc/kernel/sysfs.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch

--- linux-work.orig/arch/powerpc/kernel/sysfs.c	2009-03-25 11:17:28.000000000 +1100
+++ linux-work/arch/powerpc/kernel/sysfs.c	2009-03-25 11:18:15.000000000 +1100
@@ -140,11 +140,10 @@  static void read_##NAME(void *val) \
 { \
 	mtspr(ADDRESS, *(unsigned long *)val);	\
 } \
-static unsigned long write_##NAME(unsigned long val) \
+static void write_##NAME(void *val) \
 { \
 	ppc_enable_pmcs(); \
-	mtspr(ADDRESS, *(unsigned long *)val);	\
-	return 0; \
+	mtspr(ADDRESS, *(unsigned long *)val); \
 } \
 static ssize_t show_##NAME(struct sys_device *dev, \
 			struct sysdev_attribute *attr, \