diff options
author | Andres Salomon <dilinger@queued.net> | 2010-11-12 01:42:06 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-01-03 22:02:06 -0500 |
commit | 4a3a255289e7e322b8044286cce85031990f888a (patch) | |
tree | 60afe5f0fc76b2b4edb5374023806e26fc50fb4a /arch/sparc/prom/init_64.c | |
parent | 301a3da358b4af84915f575479e4f0885be47b73 (diff) |
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.c | 4 |
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) | |||
35 | prom_cif_init(cif_handler, cif_stack); | 35 | prom_cif_init(cif_handler, cif_stack); |
36 | 36 | ||
37 | prom_chosen_node = prom_finddevice(prom_chosen_path); | 37 | prom_chosen_node = prom_finddevice(prom_chosen_path); |
38 | if (!prom_chosen_node || prom_chosen_node == -1) | 38 | if (!prom_chosen_node || (s32)prom_chosen_node == -1) |
39 | prom_halt(); | 39 | prom_halt(); |
40 | 40 | ||
41 | prom_stdin = prom_getint(prom_chosen_node, "stdin"); | 41 | prom_stdin = prom_getint(prom_chosen_node, "stdin"); |
42 | prom_stdout = prom_getint(prom_chosen_node, "stdout"); | 42 | prom_stdout = prom_getint(prom_chosen_node, "stdout"); |
43 | 43 | ||
44 | node = prom_finddevice("/openprom"); | 44 | node = prom_finddevice("/openprom"); |
45 | if (!node || node == -1) | 45 | if (!node || (s32)node == -1) |
46 | prom_halt(); | 46 | prom_halt(); |
47 | 47 | ||
48 | prom_getstring(node, "version", prom_version, sizeof(prom_version)); | 48 | prom_getstring(node, "version", prom_version, sizeof(prom_version)); |