aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@www.linux.org.uk>2005-08-23 17:47:52 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-23 21:43:45 -0400
commit33215652e4a75dfa8adb20f4d741517457b0da2b (patch)
treea30504ff321960d35e3e845b36c7fdc8a4310a1c
parentade31f38f2ef61900e901d26061deff0c4dba085 (diff)
[PATCH] qualifiers in return types - easy cases
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>
-rw-r--r--arch/arm/kernel/traps.c2
-rw-r--r--arch/arm/nwfpe/fpopcode.h6
-rw-r--r--include/asm-arm/bug.h2
-rw-r--r--include/asm-arm/cpu-multi32.h2
-rw-r--r--include/asm-arm/cpu-single.h2
-rw-r--r--include/asm-ppc/time.h2
6 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index d571c37ac30c..4554c961251c 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -617,7 +617,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
617 notify_die("unknown data abort code", regs, &info, instr, 0); 617 notify_die("unknown data abort code", regs, &info, instr, 0);
618} 618}
619 619
620volatile void __bug(const char *file, int line, void *data) 620void __attribute__((noreturn)) __bug(const char *file, int line, void *data)
621{ 621{
622 printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); 622 printk(KERN_CRIT"kernel BUG at %s:%d!", file, line);
623 if (data) 623 if (data)
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h
index 8035f4faafbf..1777e92a88e6 100644
--- a/arch/arm/nwfpe/fpopcode.h
+++ b/arch/arm/nwfpe/fpopcode.h
@@ -370,20 +370,20 @@ TABLE 5
370#define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) 370#define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5)
371 371
372#ifdef CONFIG_FPE_NWFPE_XP 372#ifdef CONFIG_FPE_NWFPE_XP
373static inline const floatx80 getExtendedConstant(const unsigned int nIndex) 373static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex)
374{ 374{
375 extern const floatx80 floatx80Constant[]; 375 extern const floatx80 floatx80Constant[];
376 return floatx80Constant[nIndex]; 376 return floatx80Constant[nIndex];
377} 377}
378#endif 378#endif
379 379
380static inline const float64 getDoubleConstant(const unsigned int nIndex) 380static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex)
381{ 381{
382 extern const float64 float64Constant[]; 382 extern const float64 float64Constant[];
383 return float64Constant[nIndex]; 383 return float64Constant[nIndex];
384} 384}
385 385
386static inline const float32 getSingleConstant(const unsigned int nIndex) 386static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex)
387{ 387{
388 extern const float32 float32Constant[]; 388 extern const float32 float32Constant[];
389 return float32Constant[nIndex]; 389 return float32Constant[nIndex];
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h
index 24d11672eb60..7fb02138f585 100644
--- a/include/asm-arm/bug.h
+++ b/include/asm-arm/bug.h
@@ -5,7 +5,7 @@
5 5
6#ifdef CONFIG_BUG 6#ifdef CONFIG_BUG
7#ifdef CONFIG_DEBUG_BUGVERBOSE 7#ifdef CONFIG_DEBUG_BUGVERBOSE
8extern volatile void __bug(const char *file, int line, void *data); 8extern void __bug(const char *file, int line, void *data) __attribute__((noreturn));
9 9
10/* give file/line information */ 10/* give file/line information */
11#define BUG() __bug(__FILE__, __LINE__, NULL) 11#define BUG() __bug(__FILE__, __LINE__, NULL)
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h
index ff48022e4720..4679f63688e9 100644
--- a/include/asm-arm/cpu-multi32.h
+++ b/include/asm-arm/cpu-multi32.h
@@ -31,7 +31,7 @@ extern struct processor {
31 /* 31 /*
32 * Special stuff for a reset 32 * Special stuff for a reset
33 */ 33 */
34 volatile void (*reset)(unsigned long addr); 34 void (*reset)(unsigned long addr) __attribute__((noreturn));
35 /* 35 /*
36 * Idle the processor 36 * Idle the processor
37 */ 37 */
diff --git a/include/asm-arm/cpu-single.h b/include/asm-arm/cpu-single.h
index b5ec5d54665d..6723e67244fa 100644
--- a/include/asm-arm/cpu-single.h
+++ b/include/asm-arm/cpu-single.h
@@ -41,4 +41,4 @@ extern int cpu_do_idle(void);
41extern void cpu_dcache_clean_area(void *, int); 41extern void cpu_dcache_clean_area(void *, int);
42extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); 42extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
43extern void cpu_set_pte(pte_t *ptep, pte_t pte); 43extern void cpu_set_pte(pte_t *ptep, pte_t pte);
44extern volatile void cpu_reset(unsigned long addr); 44extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
diff --git a/include/asm-ppc/time.h b/include/asm-ppc/time.h
index ce09b47fa819..321fb75b5f22 100644
--- a/include/asm-ppc/time.h
+++ b/include/asm-ppc/time.h
@@ -58,7 +58,7 @@ static __inline__ void set_dec(unsigned int val)
58/* Accessor functions for the timebase (RTC on 601) registers. */ 58/* Accessor functions for the timebase (RTC on 601) registers. */
59/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ 59/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
60#ifdef CONFIG_6xx 60#ifdef CONFIG_6xx
61extern __inline__ int const __USE_RTC(void) { 61extern __inline__ int __attribute_pure__ __USE_RTC(void) {
62 return (mfspr(SPRN_PVR)>>16) == 1; 62 return (mfspr(SPRN_PVR)>>16) == 1;
63} 63}
64#else 64#else