Skip to content

Commit

Permalink
sparc: Commonize get_one_property() implementations.
Browse files Browse the repository at this point in the history
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 <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Dec 6, 2008
1 parent b9e5567 commit 59966e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/sparc/kernel/prom_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/prom_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 59966e3

Please sign in to comment.