iommu: fix MISRA C 2012 Rule 8.7 violation
authorXenia Ragiadakou <burzalodowa@gmail.com>
Tue, 28 Jun 2022 15:07:11 +0000 (17:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 28 Jun 2022 15:07:11 +0000 (17:07 +0200)
The variable iommu_crash_disable is referenced only in one translation unit.
Change its linkage from external to internal by adding the storage-class
specifier static to its definition.

This patch also aims to resolve indirectly a MISRA C 2012 Rule 8.4 violation
warning.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/iommu.c

index 75df3aa8ddaabcbdc9b66d95a57846cbb09025a3..77f64e61748de57b5d413eade4cb94fc3c3e3e2c 100644 (file)
@@ -29,7 +29,7 @@ bool_t __initdata iommu_enable = 1;
 bool_t __read_mostly iommu_enabled;
 bool_t __read_mostly force_iommu;
 bool_t __read_mostly iommu_verbose;
-bool_t __read_mostly iommu_crash_disable;
+static bool_t __read_mostly iommu_crash_disable;
 
 #define IOMMU_quarantine_none         0 /* aka false */
 #define IOMMU_quarantine_basic        1 /* aka true */