[PATCH] powerpc: change rheap functions to use long integers instead of pointers

Timur Tabi timur at freescale.com
Thu Apr 5 04:13:26 EST 2007


Sylvain Munaut wrote:

> But you're right, your not changing the actual values returned,
> ERR_PTR(x) == x ....
> So if someone wants to use it with addresses, he still can. He should
> just do cast to (void *). And to detect errors on alloc he should he
> IS_ERR(...)

How about I change rh_alloc() to return unsigned long, instead of just long, and then the 
callers can use IS_ERR_VALUE() to check for error?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale



More information about the Linuxppc-dev mailing list