From: Philippe Mathieu-Daudé Date: Mon, 20 Jan 2025 02:51:38 +0000 (+0100) Subject: target/arm: Have arm_feature() take a const @env argument X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd37919778728ffd507e367025af7db663ee7b8d;p=thirdparty%2Fqemu.git target/arm: Have arm_feature() take a const @env argument arm_feature() only access @env read-only, make it const. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20260202222412.24923-2-philmd@linaro.org> --- diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 21fee5e840..d4a146b420 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2140,7 +2140,7 @@ enum arm_features { ARM_FEATURE_BACKCOMPAT_CNTFRQ, /* 62.5MHz timer default */ }; -static inline int arm_feature(CPUARMState *env, int feature) +static inline int arm_feature(const CPUARMState *env, int feature) { return (env->features & (1ULL << feature)) != 0; }