]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Gcc 4.0 fixes.
authorRalf Baechle <ralf@linux-mips.org>
Fri, 4 Mar 2005 19:36:51 +0000 (19:36 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 29 Oct 2005 18:30:53 +0000 (19:30 +0100)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/signal32.c
arch/mips/mm/c-sb1.c
include/asm-mips/paccess.h

index 18c028ba9efa1c3d5e4d8d76df53ea60bbe2692b..663fa547ee187e1a01ba1cc436b701a3e7c14500 100644 (file)
@@ -261,11 +261,12 @@ asmlinkage int sys32_sigaction(int sig, const struct sigaction32 *act,
 
        if (act) {
                old_sigset_t mask;
+               s32 handler;
 
                if (!access_ok(VERIFY_READ, act, sizeof(*act)))
                        return -EFAULT;
-               err |= __get_user((u32)(u64)new_ka.sa.sa_handler,
-                                 &act->sa_handler);
+               err |= __get_user(handler, &act->sa_handler);
+               new_ka.sa.sa_handler = (void*)(s64)handler;
                err |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
                err |= __get_user(mask, &act->sa_mask.sig[0]);
                if (err)
@@ -826,12 +827,13 @@ asmlinkage int sys32_rt_sigaction(int sig, const struct sigaction32 *act,
                goto out;
 
        if (act) {
+               s32 handler;
                int err = 0;
 
                if (!access_ok(VERIFY_READ, act, sizeof(*act)))
                        return -EFAULT;
-               err |= __get_user((u32)(u64)new_sa.sa.sa_handler,
-                                 &act->sa_handler);
+               err |= __get_user(handler, &act->sa_handler);
+               new_sa.sa.sa_handler = (void*)(s64)handler;
                err |= __get_user(new_sa.sa.sa_flags, &act->sa_flags);
                err |= get_sigset(&new_sa.sa.sa_mask, &act->sa_mask);
                if (err)
index 502f68c664b244d58ec71ca1ee7ee940b45c379d..e65b1bb576fd7fb31c5608ceb3fe4420817d7b58 100644 (file)
@@ -235,7 +235,7 @@ static inline void __sb1_flush_icache_range(unsigned long start,
 /*
  * Invalidate all caches on this CPU
  */
-static void local_sb1___flush_cache_all(void)
+static void __attribute_used__ local_sb1___flush_cache_all(void)
 {
        __sb1_writeback_inv_dcache_all();
        __sb1_flush_icache_all();
index 309bc3099f68d9904e374168a0b923257333e6c6..46f2d23d26977cf54863322320692abb8132aa19 100644 (file)
@@ -52,7 +52,7 @@ struct __large_pstruct { unsigned long buf[100]; };
 })
 
 #define __get_dbe_asm(insn)                                            \
-({                                                                     \
+                                                                     \
        __asm__ __volatile__(                                           \
        "1:\t" insn "\t%1,%2\n\t"                                       \
        "move\t%0,$0\n"                                                 \
@@ -67,7 +67,7 @@ struct __large_pstruct { unsigned long buf[100]; };
        ".previous"                                                     \
        :"=r" (__gu_err), "=r" (__gu_val)                               \
        :"o" (__mp(__gu_addr)), "i" (-EFAULT));                         \
-})
+}
 
 extern void __get_dbe_unknown(void);
 
@@ -90,7 +90,7 @@ extern void __get_dbe_unknown(void);
 })
 
 #define __put_dbe_asm(insn)                                            \
-({                                                                     \
+                                                                     \
        __asm__ __volatile__(                                           \
        "1:\t" insn "\t%1,%2\n\t"                                       \
        "move\t%0,$0\n"                                                 \
@@ -104,7 +104,7 @@ extern void __get_dbe_unknown(void);
        ".previous"                                                     \
        : "=r" (__pu_err)                                               \
        : "r" (__pu_val), "o" (__mp(__pu_addr)), "i" (-EFAULT));        \
-})
+}
 
 extern void __put_dbe_unknown(void);