Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_ERROR_INJECTION_H
0003 #define _LINUX_ERROR_INJECTION_H
0004 
0005 #include <linux/compiler.h>
0006 #include <asm-generic/error-injection.h>
0007 
0008 #ifdef CONFIG_FUNCTION_ERROR_INJECTION
0009 
0010 extern bool within_error_injection_list(unsigned long addr);
0011 extern int get_injectable_error_type(unsigned long addr);
0012 
0013 #else /* !CONFIG_FUNCTION_ERROR_INJECTION */
0014 
0015 static inline bool within_error_injection_list(unsigned long addr)
0016 {
0017     return false;
0018 }
0019 
0020 static inline int get_injectable_error_type(unsigned long addr)
0021 {
0022     return EI_ETYPE_NONE;
0023 }
0024 
0025 #endif
0026 
0027 #endif /* _LINUX_ERROR_INJECTION_H */