linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: linuxppc-dev@ozlabs.org
Subject: Why do the rh_alloc functions return a pointer?
Date: Thu, 15 Feb 2007 13:29:10 -0600	[thread overview]
Message-ID: <45D4B486.7030409@freescale.com> (raw)

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

             reply	other threads:[~2007-02-15 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15 19:29 Timur Tabi [this message]
2007-02-15 20:30 ` Why do the rh_alloc functions return a pointer? Sylvain Munaut
2007-02-15 20:34   ` Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45D4B486.7030409@freescale.com \
    --to=timur@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).