Re: Mark bitrevX() functions as const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Howells wrote:
Jeff Garzik <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux