binfmt_flat: remove the persistent argument from flat_get_addr_from_rp

The argument is never used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
This commit is contained in:
Christoph Hellwig 2019-06-13 09:09:00 +02:00 committed by Greg Ungerer
parent 7a8998c9d8
commit 6843d8aa5b
7 changed files with 7 additions and 9 deletions

View File

@ -5,7 +5,7 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr)
{ {
*addr = get_unaligned((__force u32 *)rp); *addr = get_unaligned((__force u32 *)rp);
return 0; return 0;

View File

@ -17,7 +17,7 @@
#define flat_get_relocate_addr(rel) (rel & ~0x00000001) #define flat_get_relocate_addr(rel) (rel & ~0x00000001)
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr)
{ {
u32 val = get_unaligned((__force u32 *)rp); u32 val = get_unaligned((__force u32 *)rp);
if (!(flags & FLAT_FLAG_GOTPIC)) if (!(flags & FLAT_FLAG_GOTPIC))

View File

@ -28,7 +28,7 @@
*/ */
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr)
{ {
u32 *p = (__force u32 *)rp; u32 *p = (__force u32 *)rp;

View File

@ -12,7 +12,7 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr)
{ {
*addr = get_unaligned((__force u32 *)rp); *addr = get_unaligned((__force u32 *)rp);
return 0; return 0;

View File

@ -5,7 +5,7 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr)
{ {
*addr = get_unaligned((__force u32 *)rp); *addr = get_unaligned((__force u32 *)rp);
return 0; return 0;

View File

@ -795,7 +795,6 @@ static int load_flat_file(struct linux_binprm *bprm,
* __start to address 4 so that is okay). * __start to address 4 so that is okay).
*/ */
if (rev > OLD_FLAT_VERSION) { if (rev > OLD_FLAT_VERSION) {
u32 __maybe_unused persistent = 0;
for (i = 0; i < relocs; i++) { for (i = 0; i < relocs; i++) {
u32 addr, relval; u32 addr, relval;
__be32 tmp; __be32 tmp;
@ -816,8 +815,7 @@ static int load_flat_file(struct linux_binprm *bprm,
} }
/* Get the pointer's value. */ /* Get the pointer's value. */
ret = flat_get_addr_from_rp(rp, relval, flags, ret = flat_get_addr_from_rp(rp, relval, flags, &addr);
&addr, &persistent);
if (unlikely(ret)) if (unlikely(ret))
goto err; goto err;

View File

@ -5,7 +5,7 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
u32 *addr, u32 *persistent) u32 *addr)
{ {
#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
return copy_from_user(addr, rp, 4) ? -EFAULT : 0; return copy_from_user(addr, rp, 4) ? -EFAULT : 0;