mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
iommu: address violation of MISRA C Rule 5.5
Address a violation of MISRA C:2012 Rule 5.5: "Identifiers shall be distinct from macro names". Reports for service MC3A2.R5.5: xen/drivers/passthrough/iommu.c: non-compliant macro 'iommu_quarantine' xen/include/xen/iommu.h: non-compliant variable 'iommu_quarantine' There is a clash between function name and macro. Put the 'extern' declaration for 'iommu_quarantine' under the same preprocessor condition (#ifdef CONFIG_HAS_PCI). This ensures that the declaration is consistent and only exposed when CONFIG_HAS_PCI is defined. Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
321de728d2
commit
b2d78fab9f
1 file changed
+2
@@ -53,7 +53,9 @@ static inline bool dfn_eq(dfn_t x, dfn_t y)
|
||||
extern bool iommu_enable, iommu_enabled;
|
||||
extern bool force_iommu, iommu_verbose;
|
||||
/* Boolean except for the specific purposes of drivers/passthrough/iommu.c. */
|
||||
#ifdef CONFIG_HAS_PCI
|
||||
extern uint8_t iommu_quarantine;
|
||||
#endif /* CONFIG_HAS_PCI */
|
||||
#else
|
||||
#define iommu_enabled false
|
||||
#endif
|
||||
|
||||