From: Ingo Molnar Date: Fri, 11 Apr 2025 05:40:54 +0000 (+0200) Subject: x86/alternatives: Constify text_poke_addr() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6af9540379628a769c63b0a101ff371d7719ec04;p=users%2Fdwmw2%2Flinux.git x86/alternatives: Constify text_poke_addr() This will also allow the simplification of patch_cmp(). Signed-off-by: Ingo Molnar Cc: Juergen Gross Cc: "H . Peter Anvin" Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250411054105.2341982-43-mingo@kernel.org --- diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index a747b0885f9a2..14ca17dc36e82 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -2493,7 +2493,7 @@ static __always_inline void put_text_poke_array(void) raw_atomic_dec(refs); } -static __always_inline void *text_poke_addr(struct smp_text_poke_loc *tp) +static __always_inline void *text_poke_addr(const struct smp_text_poke_loc *tp) { return _stext + tp->rel_addr; }