Re: [PATCH] no need to cast pointer to (void *) when passing it to kfree()

From: Jörn Engel
Date: Tue Apr 05 2005 - 11:21:14 EST


On Tue, 5 April 2005 12:39:44 +0200, Jesper Juhl wrote:
> On Tue, 5 Apr 2005, David Howells wrote:
> > Jesper Juhl <juhl-lkml@xxxxxx> wrote:
> >
> > > kfree() takes a void pointer argument, no need to cast.
> >
> > vma->vm_start is unsigned long (unless it's changed since last I looked):
> >
> As I wrote in the reply I send to my original mail I made a stupid
> mistake. Don't know what I was thinking. Sorry.

Your thinking wasn't that bad, just didn't match the language. As
Linus already noted, C could use a truly transparent data type, for
things like kmalloc, kfree, or the various ->private_data fields in
structs.

Jörn

--
The cost of changing business rules is much more expensive for software
than for a secretaty.
-- unknown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/