drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()
[drm/drm-misc.git] / include / cxl / einj.h
blob624ff6ff41f9632352bebb5f7bf47ec7d265ba85
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * CXL protocol Error INJection support.
5 * Copyright (c) 2023 Advanced Micro Devices, Inc.
6 * All Rights Reserved.
8 * Author: Ben Cheatham <benjamin.cheatham@amd.com>
9 */
10 #ifndef EINJ_CXL_H
11 #define EINJ_CXL_H
13 #include <linux/errno.h>
14 #include <linux/types.h>
16 struct pci_dev;
17 struct seq_file;
19 #if IS_ENABLED(CONFIG_ACPI_APEI_EINJ_CXL)
20 int einj_cxl_available_error_type_show(struct seq_file *m, void *v);
21 int einj_cxl_inject_error(struct pci_dev *dport_dev, u64 type);
22 int einj_cxl_inject_rch_error(u64 rcrb, u64 type);
23 bool einj_cxl_is_initialized(void);
24 #else /* !IS_ENABLED(CONFIG_ACPI_APEI_EINJ_CXL) */
25 static inline int einj_cxl_available_error_type_show(struct seq_file *m,
26 void *v)
28 return -ENXIO;
31 static inline int einj_cxl_inject_error(struct pci_dev *dport_dev, u64 type)
33 return -ENXIO;
36 static inline int einj_cxl_inject_rch_error(u64 rcrb, u64 type)
38 return -ENXIO;
41 static inline bool einj_cxl_is_initialized(void) { return false; }
42 #endif /* CONFIG_ACPI_APEI_EINJ_CXL */
44 #endif /* EINJ_CXL_H */