Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Al Viro and committed by
Linus Torvalds
33215652 ade31f38

+8 -8
+1 -1
arch/arm/kernel/traps.c
··· 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)
+3 -3
arch/arm/nwfpe/fpopcode.h
··· 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];
+1 -1
include/asm-arm/bug.h
··· 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)
+1 -1
include/asm-arm/cpu-multi32.h
··· 31 31 /* 32 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 36 * Idle the processor 37 37 */
+1 -1
include/asm-arm/cpu-single.h
··· 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));
+1 -1
include/asm-ppc/time.h
··· 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