From e048acebc40cf8292ed71a1012fd53068f22924b Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 11 Jul 2012 14:02:26 -0700 Subject: h8300/uaccess: remove assignment to __gu_val in unhandled case of get_user() __gu_val is const if the passed ptr is const, giving: include/linux/pagemap.h: In function 'fault_in_pages_readable': include/linux/pagemap.h:442:2: error: assignment of read-only variable '__gu_val' include/linux/pagemap.h:448:4: error: assignment of read-only variable '__gu_val' include/linux/pagemap.h: In function 'fault_in_multipages_readable': include/linux/pagemap.h:499:3: error: assignment of read-only variable '__gu_val' include/linux/pagemap.h:508:3: error: assignment of read-only variable '__gu_val' make[4]: *** [init/main.o] Error 1 As we don't care about the actual value of __gu_val in the unhandled case (it will cause a link error anyway), just remove the assignment. Signed-off-by: Geert Uytterhoeven Cc: Yoshinori Sato Cc: Tony Breeds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/h8300/include/asm/uaccess.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/h8300') diff --git a/arch/h8300/include/asm/uaccess.h b/arch/h8300/include/asm/uaccess.h index 356068cd087..534394f4cb0 100644 --- a/arch/h8300/include/asm/uaccess.h +++ b/arch/h8300/include/asm/uaccess.h @@ -100,7 +100,6 @@ extern int __put_user_bad(void); break; \ default: \ __gu_err = __get_user_bad(); \ - __gu_val = 0; \ break; \ } \ (x) = __gu_val; \ -- cgit v1.2.3