[PATCH v2] powerpc: change rheap functions to use ulongs instead of pointers

Kumar Gala galak at kernel.crashing.org
Wed Apr 11 05:32:56 EST 2007

On Apr 10, 2007, at 2:09 PM, Timur Tabi wrote:

> Kumar Gala wrote:
>> What's the specific problem you are fixing?  Its not obvious that  
>> this patch is addressing a bug.
> problem != bug
> The problem is that a pointer implies something you can  
> dereference.  But the return value from rh_alloc() is only a  
> pointer in a specific circumstance which is not actually used in  
> any current code.  So *all* of the callers of rh_alloc() cast the  
> return value to an integer type anyway.
> In other words, it's wrong to use a pointer.  The value is a  
> generic number, and so the type needs to match that.  The code is  
> just better using ulongs.  Also, two redundant macros  
> (IS_MURAM_ERR, etc) have been removed and replaced with their  
> generic counterpart (IS_ERR_VALUE).

I consider this all code cleanup at this point since the code is  
functional at this point.  I don't disagree with any of your points,  
but this is cleanup.  We should take this all the way if we are going  
to do it.

- k

More information about the Linuxppc-dev mailing list