|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] iommu: address violation of MISRA C Rule 5.5
commit b2d78fab9f9619ced6420d301ba0f51ec7d40b1a
Author: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
AuthorDate: Thu Jul 10 13:42:10 2025 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jul 10 13:42:10 2025 +0200
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@xxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/include/xen/iommu.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 3205e49990..57f338e2a0 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |