From 5f66dd35b49ea81a03e71bfd74c28364f4e32d21 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 3 Jan 2011 08:27:55 +0000 Subject: sparc: fix sparse warnings in arch/sparc/prom for 32 bit build Fix following sparse warnings: arch/sparc/prom/bootstr_32.c:32:35: warning: Using plain integer as NULL pointer arch/sparc/prom/memory.c:61:13: warning: symbol 'prom_meminit' was not declared. Should it be static? arch/sparc/prom/misc_32.c:74:1: error: symbol 'prom_halt' redeclared with different type (originally declared at arch/sparc/include/asm/oplib_32.h:67) - different modifiers arch/sparc/prom/ranges.c:16:26: warning: symbol 'promlib_obio_ranges' was not declared. Should it be static? arch/sparc/prom/ranges.c:17:5: warning: symbol 'num_obio_ranges' was not declared. Should it be static? arch/sparc/prom/ranges.c:39:1: warning: symbol 'prom_adjust_ranges' was not declared. Should it be static? arch/sparc/prom/ranges.c:69:13: warning: symbol 'prom_ranges_init' was not declared. Should it be static? arch/sparc/prom/tree_32.c:286:22: warning: Using plain integer as NULL pointer arch/sparc/prom/tree_32.c:286:38: warning: Using plain integer as NULL pointer None of the warnings indicated any serious issues. We are now sparse clean for 32 bit build in arch/sparc/prom. Signed-off-by: Sam Ravnborg Signed-off-by: David S. Miller --- arch/sparc/prom/tree_32.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/sparc/prom/tree_32.c') diff --git a/arch/sparc/prom/tree_32.c b/arch/sparc/prom/tree_32.c index f8860eba32c2..bc8e4cb87a68 100644 --- a/arch/sparc/prom/tree_32.c +++ b/arch/sparc/prom/tree_32.c @@ -282,8 +282,10 @@ int prom_setprop(phandle node, const char *pname, char *value, int size) unsigned long flags; int ret; - if(size == 0) return 0; - if((pname == 0) || (value == 0)) return 0; + if (size == 0) + return 0; + if ((pname == NULL) || (value == NULL)) + return 0; spin_lock_irqsave(&prom_lock, flags); ret = prom_nodeops->no_setprop(node, pname, value, size); restore_current(); -- cgit v1.2.3-59-g8ed1b