summaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom/init_64.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2010-11-12 07:42:06 +0100
committerGrant Likely <grant.likely@secretlab.ca>2011-01-04 04:02:06 +0100
commit4a3a255289e7e322b8044286cce85031990f888a (patch)
tree60afe5f0fc76b2b4edb5374023806e26fc50fb4a /arch/sparc/prom/init_64.c
parentpowerpc/405: Fix missing #{address,size}-cells in i2c node (diff)
downloadlinux-4a3a255289e7e322b8044286cce85031990f888a.tar.xz
linux-4a3a255289e7e322b8044286cce85031990f888a.zip
sparc: explicitly cast negative phandle checks to s32
When we switched sparc from using 'int's to 'phandle's (which is a u32), we neglected to do anything with the various checks for -1. For those tests, explicitly cast the phandles to s32. Signed-off-by: Andres Salomon <dilinger@queued.net> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/sparc/prom/init_64.c')
-rw-r--r--arch/sparc/prom/init_64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/prom/init_64.c b/arch/sparc/prom/init_64.c
index 3ff911e7d25b..200528bb0994 100644
--- a/arch/sparc/prom/init_64.c
+++ b/arch/sparc/prom/init_64.c
@@ -35,14 +35,14 @@ void __init prom_init(void *cif_handler, void *cif_stack)
prom_cif_init(cif_handler, cif_stack);
prom_chosen_node = prom_finddevice(prom_chosen_path);
- if (!prom_chosen_node || prom_chosen_node == -1)
+ if (!prom_chosen_node || (s32)prom_chosen_node == -1)
prom_halt();
prom_stdin = prom_getint(prom_chosen_node, "stdin");
prom_stdout = prom_getint(prom_chosen_node, "stdout");
node = prom_finddevice("/openprom");
- if (!node || node == -1)
+ if (!node || (s32)node == -1)
prom_halt();
prom_getstring(node, "version", prom_version, sizeof(prom_version));