linux-user: Constify target_shmlba() argument
PATCH 1/1 linux-user: Constify target_shmlba() argument
Returning target segment low boundary address multiple shouldn't need to modify the CPU env. Make it const.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- linux-user/arm/target_syscall.h | 2 +- linux-user/mips/target_syscall.h | 2 +- linux-user/mips64/target_syscall.h | 2 +- linux-user/sh4/target_syscall.h | 2 +- linux-user/sparc/target_syscall.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
linux-user/arm/target_syscall.h +1 -1
@@ -35,7 +35,7 @@ struct target_pt_regs {#define TARGET_FORCE_SHMLBA -static inline abi_ulong target_shmlba (CPUARMState *env) +static inline abi_ulong target_shmlba (const CPUARMState *env) {return 4 *4096 ; }
linux-user/mips/target_syscall.h +1 -1
@@ -30,7 +30,7 @@ struct target_pt_regs {#define TARGET_FORCE_SHMLBA -static inline abi_ulong target_shmlba (CPUMIPSState *env) +static inline abi_ulong target_shmlba (const CPUMIPSState *env) {return 0x40000 ; }
linux-user/mips64/target_syscall.h +1 -1
@@ -27,7 +27,7 @@ struct target_pt_regs {#define TARGET_FORCE_SHMLBA -static inline abi_ulong target_shmlba (CPUMIPSState *env) +static inline abi_ulong target_shmlba (const CPUMIPSState *env) {return 0x40000 ; }
linux-user/sh4/target_syscall.h +1 -1
@@ -21,7 +21,7 @@ struct target_pt_regs {#define TARGET_FORCE_SHMLBA -static inline abi_ulong target_shmlba (CPUSH4State *env) +static inline abi_ulong target_shmlba (const CPUSH4State *env) {return 0x4000 ; }
linux-user/sparc/target_syscall.h +1 -1
@@ -45,7 +45,7 @@ struct target_pt_regs {*/ #define TARGET_FORCE_SHMLBA -static inline abi_ulong target_shmlba (CPUSPARCState *env) +static inline abi_ulong target_shmlba (const CPUSPARCState *env) {#ifdef TARGET_SPARC64 return MAX (TARGET_PAGE_SIZE ,16 *1024 );
Signature · 1 line
2.47.1
Quoted 11 lines · Philippe Mathieu-Daudé
Returning target segment low boundary address multiple shouldn't need to modify the CPU env. Make it const.
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- linux-user/arm/target_syscall.h | 2 +- linux-user/mips/target_syscall.h | 2 +- linux-user/mips64/target_syscall.h | 2 +- linux-user/sh4/target_syscall.h | 2 +- linux-user/sparc/target_syscall.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by Richard Henderson <[email protected]>
r~