]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] qualifiers in return types - easy cases
authorAl Viro <viro@www.linux.org.uk>
Tue, 23 Aug 2005 21:47:52 +0000 (22:47 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 24 Aug 2005 01:43:45 +0000 (18:43 -0700)
a bunch of functions switched from volatile to __attribute__((noreturn)) and
from const to __attribute_pure__

Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/arm/kernel/traps.c
arch/arm/nwfpe/fpopcode.h
include/asm-arm/bug.h
include/asm-arm/cpu-multi32.h
include/asm-arm/cpu-single.h
include/asm-ppc/time.h

index d571c37ac30c1f0b16fd8e81f5542aa35995d4d4..4554c961251c5871e0a05a2c6a74d1f660d0af73 100644 (file)
@@ -617,7 +617,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
        notify_die("unknown data abort code", regs, &info, instr, 0);
 }
 
-volatile void __bug(const char *file, int line, void *data)
+void __attribute__((noreturn)) __bug(const char *file, int line, void *data)
 {
        printk(KERN_CRIT"kernel BUG at %s:%d!", file, line);
        if (data)
index 8035f4faafbfa4ce780649808cd0b8bffffdf361..1777e92a88e69c73db5a0fa67438ff8520a9d56a 100644 (file)
@@ -370,20 +370,20 @@ TABLE 5
 #define getRoundingMode(opcode)                ((opcode & MASK_ROUNDING_MODE) >> 5)
 
 #ifdef CONFIG_FPE_NWFPE_XP
-static inline const floatx80 getExtendedConstant(const unsigned int nIndex)
+static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex)
 {
        extern const floatx80 floatx80Constant[];
        return floatx80Constant[nIndex];
 }
 #endif
 
-static inline const float64 getDoubleConstant(const unsigned int nIndex)
+static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex)
 {
        extern const float64 float64Constant[];
        return float64Constant[nIndex];
 }
 
-static inline const float32 getSingleConstant(const unsigned int nIndex)
+static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex)
 {
        extern const float32 float32Constant[];
        return float32Constant[nIndex];
index 24d11672eb601979d2ca64e3adf60dc923dfe22a..7fb02138f585985dd810407a82a8643bb3874d9f 100644 (file)
@@ -5,7 +5,7 @@
 
 #ifdef CONFIG_BUG
 #ifdef CONFIG_DEBUG_BUGVERBOSE
-extern volatile void __bug(const char *file, int line, void *data);
+extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
 
 /* give file/line information */
 #define BUG()          __bug(__FILE__, __LINE__, NULL)
index ff48022e472011a0ade2725ebc6e1cdba5028368..4679f63688e99c1471b2699a8f99ae163306edf3 100644 (file)
@@ -31,7 +31,7 @@ extern struct processor {
        /*
         * Special stuff for a reset
         */
-       volatile void (*reset)(unsigned long addr);
+       void (*reset)(unsigned long addr) __attribute__((noreturn));
        /*
         * Idle the processor
         */
index b5ec5d54665df03fe8f4fd6f3b17db687a6ae160..6723e67244fa1ef0f3b38d0fba23820438860855 100644 (file)
@@ -41,4 +41,4 @@ extern int cpu_do_idle(void);
 extern void cpu_dcache_clean_area(void *, int);
 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
-extern volatile void cpu_reset(unsigned long addr);
+extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
index ce09b47fa819c64333e1fd3a576d93714cbffe0c..321fb75b5f222f7a20ca3841fedf5b040ba823cf 100644 (file)
@@ -58,7 +58,7 @@ static __inline__ void set_dec(unsigned int val)
 /* Accessor functions for the timebase (RTC on 601) registers. */
 /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
 #ifdef CONFIG_6xx
-extern __inline__ int const __USE_RTC(void) {
+extern __inline__ int __attribute_pure__ __USE_RTC(void) {
        return (mfspr(SPRN_PVR)>>16) == 1;
 }
 #else