Skip to content

Commit

Permalink
arm64: add alt_cb_patch_nops prototype
Browse files Browse the repository at this point in the history
alt_cb_patch_nops() is called through an inline asm macro, so
it does not need a prototype for the caller, but adding it
avoids this W=1 build warning:

arch/arm64/kernel/alternative.c:295:14: error: no previous prototype for 'alt_cb_patch_nops' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230516160642.523862-16-arnd@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Arnd Bergmann authored and Catalin Marinas committed May 25, 2023
1 parent e13d32e commit c152aed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm64/include/asm/alternative.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ void apply_alternatives_module(void *start, size_t length);
static inline void apply_alternatives_module(void *start, size_t length) { }
#endif

void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,
__le32 *updptr, int nr_inst);

#endif /* __ASSEMBLY__ */
#endif /* __ASM_ALTERNATIVE_H */

0 comments on commit c152aed

Please sign in to comment.