From 59966e3b4e9e6573b352301ad0ceed15196d4e2d Mon Sep 17 00:00:00 2001 From: David S. Miller Date: Fri, 5 Dec 2008 17:06:47 -0800 Subject: sparc: Commonize get_one_property() implementations. Add final len assignment in sparc64's get_one_property() (it's necessary to avoid unchecked return value warnings on the sparc32 side), and mark name argument const on sparc32's copy. Signed-off-by: David S. Miller --- arch/sparc/kernel/prom_32.c | 2 +- arch/sparc/kernel/prom_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/sparc') diff --git a/arch/sparc/kernel/prom_32.c b/arch/sparc/kernel/prom_32.c index a9859d2b2565..a6809bc9ab9d 100644 --- a/arch/sparc/kernel/prom_32.c +++ b/arch/sparc/kernel/prom_32.c @@ -196,7 +196,7 @@ static char * __init build_full_name(struct device_node *dp) return n; } -static char * __init get_one_property(phandle node, char *name) +static char * __init get_one_property(phandle node, const char *name) { char *buf = ""; int len; diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c index e3969db4d58b..ce96c1cf6c3a 100644 --- a/arch/sparc/kernel/prom_64.c +++ b/arch/sparc/kernel/prom_64.c @@ -407,7 +407,7 @@ static char * __init get_one_property(phandle node, const char *name) len = prom_getproplen(node, name); if (len > 0) { buf = prom_early_alloc(len); - prom_getproperty(node, name, buf, len); + len = prom_getproperty(node, name, buf, len); } return buf; -- cgit v1.2.3