From: Randy Dunlap Date: Sun, 30 Jul 2017 17:25:37 +0000 (-0700) Subject: binfmt_flat: fix arch/m32r and arch/microblaze flat_put_addr_at_rp() X-Git-Tag: v4.14-rc1~180^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b38e51cd167927225ae0c26bd404403b7b1cd2f3;p=platform%2Fkernel%2Flinux-rpi.git binfmt_flat: fix arch/m32r and arch/microblaze flat_put_addr_at_rp() Change the m32r flat_put_addr_at_rp() function to return int and always return 0. The microblaze function already returned 0 so just change its function return type from void to int. Seven (7) other arch-es already have this function as returning an int type result. Fixes: 468138d78510 (binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail) Signed-off-by: Randy Dunlap Cc: Al Viro Reported-by: kbuild test robot Signed-off-by: Al Viro --- diff --git a/arch/m32r/include/asm/flat.h b/arch/m32r/include/asm/flat.h index 455ce7d..dfcb0e4 100644 --- a/arch/m32r/include/asm/flat.h +++ b/arch/m32r/include/asm/flat.h @@ -95,7 +95,7 @@ static inline unsigned long m32r_flat_get_addr_from_rp (u32 *rp, return ~0; /* bogus value */ } -static inline void flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval) +static inline int flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval) { unsigned int reloc = flat_m32r_get_reloc_type (relval); if (reloc & 0xf0) { @@ -133,6 +133,7 @@ static inline void flat_put_addr_at_rp(u32 *rp, u32 addr, u32 relval) break; } } + return 0; } // kludge - text_len is a local variable in the only user. diff --git a/arch/microblaze/include/asm/flat.h b/arch/microblaze/include/asm/flat.h index f23c3d2..3d2747d 100644 --- a/arch/microblaze/include/asm/flat.h +++ b/arch/microblaze/include/asm/flat.h @@ -60,7 +60,7 @@ static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, * unaligned. */ -static inline void +static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 relval) { u32 *p = (__force u32 *)rp;