Skip to content

Commit

Permalink
binfmt_flat: remove the persistent argument from flat_get_addr_from_rp
Browse files Browse the repository at this point in the history
The argument is never used.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Greg Ungerer <[email protected]>
  • Loading branch information
Christoph Hellwig authored and Greg Ungerer committed Jun 23, 2019
1 parent 7a8998c commit 6843d8a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion arch/c6x/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <asm/unaligned.h>

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);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/h8300/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#define flat_get_relocate_addr(rel) (rel & ~0x00000001)
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);
if (!(flags & FLAT_FLAG_GOTPIC))
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/

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;

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <asm/unaligned.h>

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);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <asm/unaligned.h>

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);
return 0;
Expand Down
4 changes: 1 addition & 3 deletions fs/binfmt_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,6 @@ static int load_flat_file(struct linux_binprm *bprm,
* __start to address 4 so that is okay).
*/
if (rev > OLD_FLAT_VERSION) {
u32 __maybe_unused persistent = 0;
for (i = 0; i < relocs; i++) {
u32 addr, relval;
__be32 tmp;
Expand All @@ -816,8 +815,7 @@ static int load_flat_file(struct linux_binprm *bprm,
}

/* Get the pointer's value. */
ret = flat_get_addr_from_rp(rp, relval, flags,
&addr, &persistent);
ret = flat_get_addr_from_rp(rp, relval, flags, &addr);
if (unlikely(ret))
goto err;

Expand Down
2 changes: 1 addition & 1 deletion include/asm-generic/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <linux/uaccess.h>

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
return copy_from_user(addr, rp, 4) ? -EFAULT : 0;
Expand Down

0 comments on commit 6843d8a

Please sign in to comment.