[PATCH] suppress 'store_purr' unused warning

Anton Blanchard anton at samba.org
Thu Aug 5 12:56:49 EST 2004



> Updated patch attached.

Thanks Dave,

Anton

--

Some new sysfs macros declare a store_purr() function that never gets
used, which makes a compiler warning happen.  Suppress the warning with
the used attribute.

Signed-off-by: Dave Hansen <haveblue at us.ibm.com>
Signed-off-by: Anton Blanchard <anton at samba.org>

diff -puN arch/ppc64/kernel/sysfs.c~A3-ppc64-store_purr_unused arch/ppc64/kernel/sysfs.c
--- memhotplug/arch/ppc64/kernel/sysfs.c~A3-ppc64-store_purr_unused	Wed Aug  4 16:08:52 2004
+++ memhotplug-dave/arch/ppc64/kernel/sysfs.c	Wed Aug  4 16:12:35 2004
@@ -209,8 +209,8 @@ static ssize_t show_##NAME(struct sys_de
 	unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \
 	return sprintf(buf, "%lx\n", val); \
 } \
-static ssize_t store_##NAME(struct sys_device *dev, const char *buf, \
-			    size_t count) \
+static ssize_t __attribute_used__ \
+	store_##NAME(struct sys_device *dev, const char *buf, size_t count) \
 { \
 	struct cpu *cpu = container_of(dev, struct cpu, sysdev); \
 	unsigned long val; \

_


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list