]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
xen/arm: smmuv3: fix violations of MISRA C:2012 Rule 3.1
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Thu, 29 Jun 2023 10:06:16 +0000 (12:06 +0200)
committerJulien Grall <jgrall@amazon.com>
Wed, 5 Jul 2023 08:56:16 +0000 (09:56 +0100)
In the file `xen/drivers/passthrough/arm/smmu-v3.c' there are a few occurrences
of nested '//' character sequences inside C-style comment blocks, which violate
Rule 3.1.

The patch aims to resolve those by replacing the nested comments with
equivalent constructs that do not violate the rule.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Rahul Singh <rahul.singh@arm.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/drivers/passthrough/arm/smmu-v3.c

index 720aa69ff23e4b8be2fff60f815f974f1fc06cf8..cdbb505134b7daa557ff5688b724e77d95f21d59 100644 (file)
@@ -1047,10 +1047,10 @@ static int arm_smmu_atc_inv_domain(struct arm_smmu_domain *smmu_domain,
         * before we read 'nr_ats_masters' in case of a concurrent call to
         * arm_smmu_enable_ats():
         *
-        *      // unmap()                      // arm_smmu_enable_ats()
-        *      TLBI+SYNC                       atomic_inc(&nr_ats_masters);
-        *      smp_mb();                       [...]
-        *      atomic_read(&nr_ats_masters);   pci_enable_ats() // writel()
+        *      --- unmap() ---                 --- arm_smmu_enable_ats() ---
+        *      TLBI+SYNC                       atomic_inc(&nr_ats_masters);
+        *      smp_mb();                       [...]
+        *      atomic_read(&nr_ats_masters);   pci_enable_ats() (see writel())
         *
         * Ensures that we always see the incremented 'nr_ats_masters' count if
         * ATS was enabled at the PCI device before completion of the TLBI.