Skip to content

Commit 6843d8a

Browse files
Christoph HellwigGreg Ungerer
authored andcommitted
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>
1 parent 7a8998c commit 6843d8a

File tree

7 files changed

+7
-9
lines changed

7 files changed

+7
-9
lines changed

arch/c6x/include/asm/flat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <asm/unaligned.h>
66

77
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
8-
u32 *addr, u32 *persistent)
8+
u32 *addr)
99
{
1010
*addr = get_unaligned((__force u32 *)rp);
1111
return 0;

arch/h8300/include/asm/flat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#define flat_get_relocate_addr(rel) (rel & ~0x00000001)
1919
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
20-
u32 *addr, u32 *persistent)
20+
u32 *addr)
2121
{
2222
u32 val = get_unaligned((__force u32 *)rp);
2323
if (!(flags & FLAT_FLAG_GOTPIC))

arch/microblaze/include/asm/flat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929

3030
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
31-
u32 *addr, u32 *persistent)
31+
u32 *addr)
3232
{
3333
u32 *p = (__force u32 *)rp;
3434

arch/sh/include/asm/flat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <asm/unaligned.h>
1313

1414
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
15-
u32 *addr, u32 *persistent)
15+
u32 *addr)
1616
{
1717
*addr = get_unaligned((__force u32 *)rp);
1818
return 0;

arch/xtensa/include/asm/flat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <asm/unaligned.h>
66

77
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
8-
u32 *addr, u32 *persistent)
8+
u32 *addr)
99
{
1010
*addr = get_unaligned((__force u32 *)rp);
1111
return 0;

fs/binfmt_flat.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,6 @@ static int load_flat_file(struct linux_binprm *bprm,
795795
* __start to address 4 so that is okay).
796796
*/
797797
if (rev > OLD_FLAT_VERSION) {
798-
u32 __maybe_unused persistent = 0;
799798
for (i = 0; i < relocs; i++) {
800799
u32 addr, relval;
801800
__be32 tmp;
@@ -816,8 +815,7 @@ static int load_flat_file(struct linux_binprm *bprm,
816815
}
817816

818817
/* Get the pointer's value. */
819-
ret = flat_get_addr_from_rp(rp, relval, flags,
820-
&addr, &persistent);
818+
ret = flat_get_addr_from_rp(rp, relval, flags, &addr);
821819
if (unlikely(ret))
822820
goto err;
823821

include/asm-generic/flat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <linux/uaccess.h>
66

77
static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags,
8-
u32 *addr, u32 *persistent)
8+
u32 *addr)
99
{
1010
#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
1111
return copy_from_user(addr, rp, 4) ? -EFAULT : 0;

0 commit comments

Comments
 (0)