linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Why do the rh_alloc functions return a pointer?
@ 2007-02-15 19:29 Timur Tabi
  2007-02-15 20:30 ` Sylvain Munaut
  0 siblings, 1 reply; 3+ messages in thread
From: Timur Tabi @ 2007-02-15 19:29 UTC (permalink / raw)
  To: linuxppc-dev

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-15 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-15 19:29 Why do the rh_alloc functions return a pointer? Timur Tabi
2007-02-15 20:30 ` Sylvain Munaut
2007-02-15 20:34   ` Timur Tabi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).