Re: [PATCH 3/3] signal.c: fix gcc warning on 32 bits kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/07, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
Which is quite a funny C problem to solve :-)


How about this instead ?

-- >8 --

diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h
index 1cdd4ee..ab7fe1c 100644
--- a/include/asm-mips/uaccess.h
+++ b/include/asm-mips/uaccess.h
@@ -265,7 +265,7 @@ do {									\
 */
#define __get_user_asm_ll32(val, addr)					\
{									\
-        unsigned long long __gu_tmp;					\
+        __typeof__(*(addr)) __gu_tmp;					\
									\
	__asm__ __volatile__(						\
	"1:	lw	%1, (%3)				\n"	\
@@ -283,7 +283,7 @@ do {									\
	"	.previous					\n"	\
	: "=r" (__gu_err), "=&r" (__gu_tmp)				\
	: "0" (0), "r" (addr), "i" (-EFAULT));				\
-	(val) = (__typeof__(*(addr))) __gu_tmp;				\
+	(val) = __gu_tmp;						\
}

/*

--
              Franck


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux