powerpc: Fix warnings introduced by sysfs changes
PATCH 1/1 powerpc: Fix warnings introduced by sysfs changes
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 <[email protected]>
---
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(-)
arch/powerpc/kernel/sysfs.c +2 -3
@@ -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, \