Skip to contentSkip to conversation

: sparc: Commonize get_one_property() implementations.

PATCH In review David Miller 1 participant 1 message Dec 6, 2008 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 8/14 : sparc: Commonize get_one_property() implementations.

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.

---
 arch/sparc/kernel/prom_32.c |    2 +-
 arch/sparc/kernel/prom_64.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/sparc/kernel/prom_32.c +1 -1
index a9859d2..a6809bc 100644
@@ -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 = "<NULL>";
 	int len;
arch/sparc/kernel/prom_64.c +1 -1
index e3969db..ce96c1c 100644
@@ -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;
Signature · 1 line
1.5.6.5