/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_GENERIC_ERROR_INJECTION_H #define _ASM_GENERIC_ERROR_INJECTION_H #if defined(__KERNEL__) && !defined(__ASSEMBLY__) enum { … }; struct error_injection_entry { … }; struct pt_regs; #ifdef CONFIG_FUNCTION_ERROR_INJECTION /* * Whitelist generating macro. Specify functions which can be error-injectable * using this macro. If you unsure what is required for the error-injectable * functions, please read Documentation/fault-injection/fault-injection.rst * 'Error Injectable Functions' section. */ #define ALLOW_ERROR_INJECTION(fname, _etype) … void override_function_with_return(struct pt_regs *regs); #else #define ALLOW_ERROR_INJECTION … static inline void override_function_with_return(struct pt_regs *regs) { } #endif #endif #endif /* _ASM_GENERIC_ERROR_INJECTION_H */