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>
This commit is contained in:
committed by
Grant Likely
parent
301a3da358
commit
4a3a255289
@@ -121,7 +121,7 @@ void __init auxio_power_probe(void)
|
||||
node = prom_searchsiblings(node, "obio");
|
||||
node = prom_getchild(node);
|
||||
node = prom_searchsiblings(node, "power");
|
||||
if (node == 0 || node == -1)
|
||||
if (node == 0 || (s32)node == -1)
|
||||
return;
|
||||
|
||||
/* Map the power control register. */
|
||||
|
@@ -24,7 +24,7 @@ int this_is_starfire = 0;
|
||||
void check_if_starfire(void)
|
||||
{
|
||||
phandle ssnode = prom_finddevice("/ssp-serial");
|
||||
if (ssnode != 0 && ssnode != -1)
|
||||
if (ssnode != 0 && (s32)ssnode != -1)
|
||||
this_is_starfire = 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user