Subject: Why do the rh_alloc functions return a pointer?

From: Timur Tabi <[email-masked]>
Date: Thu, 15 Feb 2007 13:29:10 -0600

The rh_alloc functions (rh_alloc, rh_alloc_fixed, rh_alloc_align) all return a 
"void *".  However, the actual value passed is an offset into a block of memory. 
  In most cases, the first time rh_alloc is called, it returns zero.

There are several wrapper functions for rh_alloc, and all of them cast the 
return value to an unsigned integer.

So my question is, why do the rh_alloc functions return a pointer?  Shouldn't 
they all return a u32 or uint?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale