Why is the kfree() argument const?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Weiner
Date: Wednesday, January 16, 2008 - 9:32 am

Hi,

is there any reason why kfree() takes a const pointer just to degrade it
with the call to slab_free()/__cache_free() again?  The promise that the
pointee is not modified is just bogus in this case, anyway, isn't it?

	Hannes
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Why is the kfree() argument const?, Johannes Weiner, (Wed Jan 16, 9:32 am)
Re: Why is the kfree() argument const?, Christoph Lameter, (Wed Jan 16, 9:48 am)
Re: Why is the kfree() argument const?, Bernd Petrovitsch, (Wed Jan 16, 10:34 am)
Re: Why is the kfree() argument const?, Pekka J Enberg, (Wed Jan 16, 10:45 am)
Re: Why is the kfree() argument const?, Linus Torvalds, (Wed Jan 16, 11:39 am)
Re: Why is the kfree() argument const?, Johannes Weiner, (Wed Jan 16, 3:19 pm)
Re: Why is the kfree() argument const?, Christoph Lameter, (Wed Jan 16, 3:20 pm)
Re: Why is the kfree() argument const?, Johannes Weiner, (Wed Jan 16, 3:37 pm)
Re: Why is the kfree() argument const?, Linus Torvalds, (Wed Jan 16, 4:16 pm)
Re: Why is the kfree() argument const?, Linus Torvalds, (Wed Jan 16, 4:18 pm)