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/kernel | |
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/kernel')
-rw-r--r-- | arch/sparc/kernel/auxio_32.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/starfire.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/auxio_32.c b/arch/sparc/kernel/auxio_32.c index 35f48837871a..8505e0ac78ba 100644 --- a/arch/sparc/kernel/auxio_32.c +++ b/arch/sparc/kernel/auxio_32.c | |||
@@ -121,7 +121,7 @@ void __init auxio_power_probe(void) | |||
121 | node = prom_searchsiblings(node, "obio"); | 121 | node = prom_searchsiblings(node, "obio"); |
122 | node = prom_getchild(node); | 122 | node = prom_getchild(node); |
123 | node = prom_searchsiblings(node, "power"); | 123 | node = prom_searchsiblings(node, "power"); |
124 | if (node == 0 || node == -1) | 124 | if (node == 0 || (s32)node == -1) |
125 | return; | 125 | return; |
126 | 126 | ||
127 | /* Map the power control register. */ | 127 | /* Map the power control register. */ |
diff --git a/arch/sparc/kernel/starfire.c b/arch/sparc/kernel/starfire.c index a4446c0fb7a1..82281a566bb8 100644 --- a/arch/sparc/kernel/starfire.c +++ b/arch/sparc/kernel/starfire.c | |||
@@ -24,7 +24,7 @@ int this_is_starfire = 0; | |||
24 | void check_if_starfire(void) | 24 | void check_if_starfire(void) |
25 | { | 25 | { |
26 | phandle ssnode = prom_finddevice("/ssp-serial"); | 26 | phandle ssnode = prom_finddevice("/ssp-serial"); |
27 | if (ssnode != 0 && ssnode != -1) | 27 | if (ssnode != 0 && (s32)ssnode != -1) |
28 | this_is_starfire = 1; | 28 | this_is_starfire = 1; |
29 | } | 29 | } |
30 | 30 | ||