linux-next: sparc64 build failure
Hi David,
Today's linux-next build (sparc64 defconfig) failed like this:
arch/sparc64/kernel/sysfs.c:160: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:160: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:205: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:206: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:207: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:208: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:209: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:210: warning: initialization from incompatible pointer type arch/sparc64/kernel/sysfs.c:211: warning: initialization from incompatible pointer type make[2]: *** [arch/sparc64/kernel/sysfs.o] Error 1
Caused by commit 5b01a6a61c48d8e6ab4679d6e6208f5962d07b85 ("sysdev: Pass the attribute to the low level sysdev show/store function") from the driver-core tree. I have applied the patch below.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 1 line
From
2b3ba8b78163527dade51c5c92ce52526abbb198Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <[email protected]>
Date: Tue, 8 Jul 2008 19:03:49 +1000
Subject: [PATCH] sparc64: sysdev API change fallout
--- arch/sparc64/kernel/sysfs.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
arch/sparc64/kernel/sysfs.c +4 -4
@@ -136,13 +136,13 @@ static unsigned long write_mmustat_enable(unsigned long val)return sun4v_mmustat_conf (ra, &orig_ra); } -static ssize_t show_mmustat_enable (struct sys_device *s,char *buf) +static ssize_t show_mmustat_enable (struct sys_device *s,struct sysdev_attribute *attr,char *buf) {unsigned long val =run_on_cpu (s->id, read_mmustat_enable,0 );return sprintf (buf,"%lx\n" , val); } -static ssize_t store_mmustat_enable (struct sys_device *s,const char *buf,size_t count) +static ssize_t store_mmustat_enable (struct sys_device *s,struct sysdev_attribute *attr,const char *buf,size_t count) {unsigned long val, err;int ret =sscanf (buf,"%ld" , &val);
@@ -180,14 +180,14 @@ static void unregister_mmu_stats(struct sys_device *s)#endif #define SHOW_CPUDATA_ULONG_NAME (NAME ,MEMBER ) \ -static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ +static ssize_t show_##NAME(struct sys_device *dev, struct sysdev_attribute *attr, char *buf) \ { \ cpuinfo_sparc *c = &cpu_data(dev->id); \ return sprintf(buf, "%lu\n", c->MEMBER); \ }#define SHOW_CPUDATA_UINT_NAME (NAME ,MEMBER ) \ -static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ +static ssize_t show_##NAME(struct sys_device *dev, struct sysdev_attribute *attr, char *buf) \ { \ cpuinfo_sparc *c = &cpu_data(dev->id); \ return sprintf(buf, "%u\n", c->MEMBER); \
Signature · 1 line
1.5.6.2
David Miller
Acked-byFrom: Stephen Rothwell <[email protected]>
Date: Tue, 8 Jul 2008 19:08:37 +1000
Quoted 3 lines
Caused by commit
5b01a6a61c48d8e6ab4679d6e6208f5962d07b85("sysdev: Pass the attribute to the low level sysdev show/store function") from the driver-core tree. I have applied the patch below.
If the driver-core folks could add this patch to their tree to that changeset, I'd appreciate it. :)