Re: Mark bitrevX() functions as const

From: Jeff Garzik
Date: Mon Dec 11 2006 - 08:33:12 EST


David Howells wrote:
Jeff Garzik <jeff@xxxxxxxxxx> wrote:
* naked __attribute__ is ugly. define something short and memorable in
include/linux/compiler.h.

I'm not sure that's a good idea. You have to be careful not to cause confusion
with ordinary "const".

It's all in the naming. You could call it 'purefunc' or somesuch.

__attribute__ is very very ugly, an hinders a quick scan of the function prototype, particularly if it has a boatload of other attributes.


* another annotation to consider is C99 keyword 'restrict'.

Indeed, though I presume you don't mean in this particular case...

Correct.

Jeff



-
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/