mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Mark bitrevX() functions as const
@ 2006-12-11 12:35 David Howells
  2006-12-11 12:57 ` Jeff Garzik
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: David Howells @ 2006-12-11 12:35 UTC (permalink / raw)
  To: Akinobu Mita, torvalds, akpm; +Cc: linux-kernel


Mark the bit reversal functions as being const as they always return the same
output for any given input.

Signed-Off-By: David Howells <dhowells@redhat.com>
---

 include/linux/bitrev.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h
index 05e540d..032056b 100644
--- a/include/linux/bitrev.h
+++ b/include/linux/bitrev.h
@@ -5,11 +5,11 @@ #include <linux/types.h>
 
 extern u8 const byte_rev_table[256];
 
-static inline u8 bitrev8(u8 byte)
+static inline __attribute__((const)) u8 bitrev8(u8 byte)
 {
 	return byte_rev_table[byte];
 }
 
-extern u32 bitrev32(u32 in);
+extern __attribute__((const)) u32 bitrev32(u32 in);
 
 #endif /* _LINUX_BITREV_H */

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-12-11 17:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-11 12:35 Mark bitrevX() functions as const David Howells
2006-12-11 12:57 ` Jeff Garzik
2006-12-11 13:37   ` Andreas Schwab
2006-12-11 13:53     ` Jeff Garzik
2006-12-11 13:14 ` David Howells
2006-12-11 13:32   ` Jeff Garzik
2006-12-11 14:18   ` David Howells
2006-12-11 13:25 ` Akinobu Mita
2006-12-11 14:22 ` David Howells
2006-12-11 16:05 ` Linus Torvalds
2006-12-11 16:12 ` David Howells
2006-12-11 16:34   ` Linus Torvalds
2006-12-11 17:35   ` Jan Engelhardt
2006-12-11 17:51     ` Bernd Petrovitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®