[PATCH] powerpc: change rheap functions to use long integers instead of pointers
galak at kernel.crashing.org
Thu Apr 5 02:42:17 EST 2007
On Apr 3, 2007, at 11:02 AM, Timur Tabi wrote:
> (This patch is currently for review only. It is based on Paul's
> branch. Please note that the code in this branch is missing many
> fixes for
> 2.6.21, and so some code will not compile. Specifially, ARCH=ppc
> is very
> The rheap allocation functions are coded to return a pointer, but
> the actual
> value returned is an offset into a buffer. Callers of rheap_alloc
> () typically
> cast the return value to an integer. Similarly, rheap_free() took
> a pointer
> as a parameter, when it should be an unsigned long.
> This patch changes all of the relevant rheap functions to use an
> unsigned long
> instead of a pointer. The allocation functions return a signed
> long, where a
> negative number indicates error.
> All code which calls the rheap functions is updated accordingly.
> IS_MURAM_ERR() and IS_DPERR() have been deleted.
> Signed-off-by: Timur Tabi <timur at freescale.com>
I'm concerned the error handling isn't correctly. What happens if
the rheap I'm managing has addresses at 0xf0000000. When I compare
offset to 0, its going to report as an error, even if the offset
returned is valid.
More information about the Linuxppc-dev