public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Sylvain Munaut <tnt@246tNt•com>
To: Timur Tabi <timur@freescale•com>
Cc: linuxppc-dev@ozlabs•org
Subject: Re: [PATCH] powerpc: change rheap functions to use long integers instead of pointers
Date: Wed, 04 Apr 2007 21:31:53 +0200	[thread overview]
Message-ID: <4613FD29.6050908@246tNt.com> (raw)
In-Reply-To: <4613FA75.206@freescale.com>

Timur Tabi wrote:
> Dan Malek wrote:
>
>> How about just leaving it alone?  
>
> Panto said a while back that using unsigned long instead of void * is
> better.
>
> > A void * is
>> perfectly valid as rheap could be used to manage
>> any address space. 
>
> And therefore, it shouldn't be a pointer, because that implies that it
> can be dereferenced.  An unsigned long is a better type to use for a
> generic value than a void pointer.
FWIW, I agree that unsigned long is better. If it can hold anything, it
shouldn't be a pointer. And since currently _all_ users use it to store
offset, that removes a lot of un-necessary casts.

>> you are reducing
>> it's capability (by taking it's object management
>> outside of the kernel virtual space), 
>
> Sorry, I don't understand that.
Actually the returned value don't change so all it does is to shed some
light on some previously present but unseen issues ...
>
>> and you are
>> introducing concerns for error conditions of
>> current users.
>
> I'm fixing those by changing the type from long to ulong and using
> IS_ERR_VALUE().
That looks good to me ...


    Sylvain

  reply	other threads:[~2007-04-04 19:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03 16:02 [PATCH] powerpc: change rheap functions to use long integers instead of pointers Timur Tabi
2007-04-04 16:42 ` Kumar Gala
2007-04-04 17:36   ` Pantelis Antoniou
2007-04-04 17:42   ` Timur Tabi
2007-04-04 18:00     ` Sylvain Munaut
2007-04-04 18:05       ` Timur Tabi
2007-04-04 18:13       ` Timur Tabi
2007-04-04 19:15         ` Dan Malek
2007-04-04 19:20           ` Timur Tabi
2007-04-04 19:31             ` Sylvain Munaut [this message]
2007-04-04 18:13       ` Scott Wood
2007-04-04 18:19         ` Timur Tabi
2007-04-04 18:24           ` Scott Wood
2007-04-04 18:27             ` Timur Tabi
2007-04-04 18:31               ` Scott Wood
2007-04-04 18: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=4613FD29.6050908@246tNt.com \
    --to=tnt@246tnt$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=timur@freescale$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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