aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorMartin Habets <errandir_news@mph.eclipse.co.uk>2006-10-09 21:10:16 -0400
committerDavid S. Miller <davem@davemloft.net>2006-10-09 21:10:16 -0400
commit078830eaa8abccd1e95d3effce5b29273bb5ed09 (patch)
tree500cb8fdfef241f81594cbf0b2eb64209cb6e280 /arch/sparc
parent79bf06248b69b937f3a917281b4a8520a66c7582 (diff)
[SPARC32]: Fix prom.c build warning
Fix these 2.6.19-rc1 build warnings: CC arch/sparc/kernel/prom.o arch/sparc/kernel/prom.c: In function `of_set_property': arch/sparc/kernel/prom.c:246: warning: passing arg 2 of `prom_setprop' discards qualifiers from pointer target type arch/sparc/kernel/prom.c: In function `build_one_prop': arch/sparc/kernel/prom.c:446: warning: unused variable `len' arch/sparc/kernel/prom.c:480: warning: ignoring return value of `prom_getproperty', declared with attribute warn_unused_result Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/prom.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c
index 4ca9e5fc97f4..2cc302b6bec0 100644
--- a/arch/sparc/kernel/prom.c
+++ b/arch/sparc/kernel/prom.c
@@ -243,7 +243,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
243 void *old_val = prop->value; 243 void *old_val = prop->value;
244 int ret; 244 int ret;
245 245
246 ret = prom_setprop(dp->node, name, val, len); 246 ret = prom_setprop(dp->node, (char *) name, val, len);
247 err = -EINVAL; 247 err = -EINVAL;
248 if (ret >= 0) { 248 if (ret >= 0) {
249 prop->value = new_val; 249 prop->value = new_val;
@@ -477,7 +477,10 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s
477 p->length = 0; 477 p->length = 0;
478 } else { 478 } else {
479 p->value = prom_early_alloc(p->length + 1); 479 p->value = prom_early_alloc(p->length + 1);
480 prom_getproperty(node, p->name, p->value, p->length); 480 len = prom_getproperty(node, p->name, p->value,
481 p->length);
482 if (len <= 0)
483 p->length = 0;
481 ((unsigned char *)p->value)[p->length] = '\0'; 484 ((unsigned char *)p->value)[p->length] = '\0';
482 } 485 }
483 } 486 }