Commit 33215652e4a75dfa8adb20f4d741517457b0da2b
Committed by
Linus Torvalds
1 parent
ade31f38f2
Exists in
master
and in
7 other branches
[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>
Showing 6 changed files with 8 additions and 8 deletions Side-by-side Diff
arch/arm/kernel/traps.c
... | ... | @@ -617,7 +617,7 @@ |
617 | 617 | notify_die("unknown data abort code", regs, &info, instr, 0); |
618 | 618 | } |
619 | 619 | |
620 | -volatile void __bug(const char *file, int line, void *data) | |
620 | +void __attribute__((noreturn)) __bug(const char *file, int line, void *data) | |
621 | 621 | { |
622 | 622 | printk(KERN_CRIT"kernel BUG at %s:%d!", file, line); |
623 | 623 | if (data) |
arch/arm/nwfpe/fpopcode.h
... | ... | @@ -370,20 +370,20 @@ |
370 | 370 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) |
371 | 371 | |
372 | 372 | #ifdef CONFIG_FPE_NWFPE_XP |
373 | -static inline const floatx80 getExtendedConstant(const unsigned int nIndex) | |
373 | +static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) | |
374 | 374 | { |
375 | 375 | extern const floatx80 floatx80Constant[]; |
376 | 376 | return floatx80Constant[nIndex]; |
377 | 377 | } |
378 | 378 | #endif |
379 | 379 | |
380 | -static inline const float64 getDoubleConstant(const unsigned int nIndex) | |
380 | +static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) | |
381 | 381 | { |
382 | 382 | extern const float64 float64Constant[]; |
383 | 383 | return float64Constant[nIndex]; |
384 | 384 | } |
385 | 385 | |
386 | -static inline const float32 getSingleConstant(const unsigned int nIndex) | |
386 | +static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) | |
387 | 387 | { |
388 | 388 | extern const float32 float32Constant[]; |
389 | 389 | return float32Constant[nIndex]; |
include/asm-arm/bug.h
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | |
6 | 6 | #ifdef CONFIG_BUG |
7 | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
8 | -extern volatile void __bug(const char *file, int line, void *data); | |
8 | +extern void __bug(const char *file, int line, void *data) __attribute__((noreturn)); | |
9 | 9 | |
10 | 10 | /* give file/line information */ |
11 | 11 | #define BUG() __bug(__FILE__, __LINE__, NULL) |
include/asm-arm/cpu-multi32.h
include/asm-arm/cpu-single.h
... | ... | @@ -41,5 +41,5 @@ |
41 | 41 | extern void cpu_dcache_clean_area(void *, int); |
42 | 42 | extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm); |
43 | 43 | extern void cpu_set_pte(pte_t *ptep, pte_t pte); |
44 | -extern volatile void cpu_reset(unsigned long addr); | |
44 | +extern void cpu_reset(unsigned long addr) __attribute__((noreturn)); |
include/asm-ppc/time.h
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | /* Accessor functions for the timebase (RTC on 601) registers. */ |
59 | 59 | /* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ |
60 | 60 | #ifdef CONFIG_6xx |
61 | -extern __inline__ int const __USE_RTC(void) { | |
61 | +extern __inline__ int __attribute_pure__ __USE_RTC(void) { | |
62 | 62 | return (mfspr(SPRN_PVR)>>16) == 1; |
63 | 63 | } |
64 | 64 | #else |