]> git.hungrycats.org Git - linux/commit
[PATCH] const vs. __attribute__((const)) confusion
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:43:54 +0000 (18:43 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:43:54 +0000 (18:43 -0800)
commit0697fbd3f0d9083223de23ea16c1754de0d8c28b
tree19beafacc89818ad8ee889494f8922085e4b871e
parent477702e9c136022c858d8b4f59832c5a4eafe526
[PATCH] const vs. __attribute__((const)) confusion

From: "H. Peter Anvin" <hpa@zytor.com>

Declaring a function to return a const scalar value is pretty meaningless.
These functions are really trying to say that they don't alter any external
state.

Fix that up by using __attribute__((const)), if the compiler supports that.
15 files changed:
include/asm-cris/arch-v10/byteorder.h
include/asm-i386/byteorder.h
include/asm-ia64/byteorder.h
include/asm-m68k/byteorder.h
include/asm-parisc/byteorder.h
include/asm-ppc/byteorder.h
include/asm-ppc64/byteorder.h
include/asm-sh/byteorder.h
include/asm-v850/byteorder.h
include/asm-x86_64/byteorder.h
include/linux/byteorder/swab.h
include/linux/compiler-gcc+.h
include/linux/compiler-gcc2.h
include/linux/compiler-gcc3.h
include/linux/compiler.h