Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33215652 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[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: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ade31f38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
+3 −3
Original line number Diff line number Diff line
@@ -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];
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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
	 */
+1 −1
Original line number Diff line number Diff line
@@ -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));
Loading