From 006076148886e74c2b5529751aa7281c3d5ee259 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Sun, 30 May 2004 07:35:38 -0700 Subject: [PATCH] [PATCH] sparse alpha: the rest of it A bunch of "return in void function" dealt with, removed bogus extern from definition of __load_new_mm_context(), sanitized fscking ugly CROSS_64K() helper (even if sparse doesn't segfault on that anymore, it's _still_ fscking ugly). --- arch/alpha/kernel/core_marvel.c | 2 +- arch/alpha/kernel/err_marvel.c | 3 ++- arch/alpha/kernel/err_titan.c | 6 ++++-- arch/alpha/mm/fault.c | 2 +- include/asm-alpha/floppy.h | 9 +++++---- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/alpha/kernel/core_marvel.c b/arch/alpha/kernel/core_marvel.c index 5906f38fb7f..9bde638e8fc 100644 --- a/arch/alpha/kernel/core_marvel.c +++ b/arch/alpha/kernel/core_marvel.c @@ -718,7 +718,7 @@ marvel_iounmap(unsigned long addr) if (((long)addr >> 41) == -2) return; /* kseg map, nothing to do */ if (addr) - return vfree((void *)(PAGE_MASK & addr)); + vfree((void *)(PAGE_MASK & addr)); } #ifndef CONFIG_ALPHA_GENERIC diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index 8355284bd0f..70b38b1d2af 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c @@ -1077,7 +1077,8 @@ marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) default: /* Don't know it - pass it up. */ - return ev7_machine_check(vector, la_ptr, regs); + ev7_machine_check(vector, la_ptr, regs); + return; } /* diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index 505cdb3db14..897ea1a15b6 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c @@ -407,8 +407,10 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) /* * Only handle system errors here */ - if ((vector != SCB_Q_SYSMCHK) && (vector != SCB_Q_SYSERR)) - return ev6_machine_check(vector, la_ptr, regs); + if ((vector != SCB_Q_SYSMCHK) && (vector != SCB_Q_SYSERR)) { + ev6_machine_check(vector, la_ptr, regs); + return; + } /* * It's a system error, handle it here diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index e7a49c16e48..242317d1509 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c @@ -40,7 +40,7 @@ extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *); unsigned long last_asn = ASN_FIRST_VERSION; #endif -extern void +void __load_new_mm_context(struct mm_struct *next_mm) { unsigned long mmc; diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h index 41ab32c4f04..289a00d51a9 100644 --- a/include/asm-alpha/floppy.h +++ b/include/asm-alpha/floppy.h @@ -108,10 +108,11 @@ static int FDC2 = -1; * on that platform... ;-} */ -#define CROSS_64KB(a,s) \ -({ unsigned long __s64 = (unsigned long)(a); \ - unsigned long __e64 = __s64 + (unsigned long)(s) - 1; \ - (__s64 ^ __e64) & ~0xfffful; }) +static inline unsigned long CROSS_64KB(void *a, unsigned long s) +{ + unsigned long p = (unsigned long)a; + return ((p + s - 1) ^ p) & ~0xffffUL; +} #define EXTRA_FLOPPY_PARAMS -- 2.11.4.GIT