Merge branch 'readdir' (readdir speedup and sanity checking)
[linux-block.git] / include / linux / error-injection.h
CommitLineData
540adea3
MH
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_ERROR_INJECTION_H
3#define _LINUX_ERROR_INJECTION_H
4
45880f7b
LY
5#include <linux/compiler.h>
6#include <asm-generic/error-injection.h>
540adea3 7
45880f7b 8#ifdef CONFIG_FUNCTION_ERROR_INJECTION
540adea3
MH
9
10extern bool within_error_injection_list(unsigned long addr);
663faf9f 11extern int get_injectable_error_type(unsigned long addr);
540adea3
MH
12
13#else /* !CONFIG_FUNCTION_ERROR_INJECTION */
14
540adea3
MH
15static inline bool within_error_injection_list(unsigned long addr)
16{
17 return false;
18}
19
663faf9f
MH
20static inline int get_injectable_error_type(unsigned long addr)
21{
22 return EI_ETYPE_NONE;
23}
24
540adea3
MH
25#endif
26
27#endif /* _LINUX_ERROR_INJECTION_H */