Skip to content

Commit 2f3196d

Browse files
Christoph HellwigGreg Ungerer
authored andcommitted
binfmt_flat: remove flat_set_persistent
This helper is a no-op on all architectures, remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
1 parent 9ee24b2 commit 2f3196d

File tree

8 files changed

+0
-13
lines changed

8 files changed

+0
-13
lines changed

arch/arm/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
3131
}
3232

3333
#define flat_get_relocate_addr(rel) (rel)
34-
#define flat_set_persistent(relval, p) 0
3534

3635
#endif /* __ARM_FLAT_H__ */

arch/c6x/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
1818
return 0;
1919
}
2020
#define flat_get_relocate_addr(rel) (rel)
21-
#define flat_set_persistent(relval, p) 0
2221

2322
#endif /* __ASM_C6X_FLAT_H */

arch/h8300/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#define flat_argvp_envp_on_stack() 1
1212
#define flat_old_ram_flag(flags) 1
13-
#define flat_set_persistent(relval, p) 0
1413

1514
/*
1615
* on the H8 a couple of the relocations have an instruction in the

arch/m68k/include/asm/flat.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
3030
}
3131
#define flat_get_relocate_addr(rel) (rel)
3232

33-
static inline int flat_set_persistent(u32 relval, u32 *persistent)
34-
{
35-
return 0;
36-
}
37-
3833
#define FLAT_PLAT_INIT(regs) \
3934
do { \
4035
if (current->mm) \

arch/microblaze/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#define flat_argvp_envp_on_stack() 0
1717
#define flat_old_ram_flag(flags) (flags)
18-
#define flat_set_persistent(relval, p) 0
1918

2019
/*
2120
* Microblaze works a little differently from other arches, because

arch/sh/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
2525
return 0;
2626
}
2727
#define flat_get_relocate_addr(rel) (rel)
28-
#define flat_set_persistent(relval, p) ({ (void)p; 0; })
2928

3029
#define FLAT_PLAT_INIT(_r) \
3130
do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \

arch/xtensa/include/asm/flat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
1818
return 0;
1919
}
2020
#define flat_get_relocate_addr(rel) (rel)
21-
#define flat_set_persistent(relval, p) 0
2221

2322
#endif /* __ASM_XTENSA_FLAT_H */

fs/binfmt_flat.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,6 @@ static int load_flat_file(struct linux_binprm *bprm,
787787
if (get_user(relval, reloc + i))
788788
return -EFAULT;
789789
relval = ntohl(relval);
790-
if (flat_set_persistent(relval, &persistent))
791-
continue;
792790
addr = flat_get_relocate_addr(relval);
793791
rp = (u32 __user *)calc_reloc(addr, libinfo, id, 1);
794792
if (rp == (u32 __user *)RELOC_FAILED) {

0 commit comments

Comments
 (0)