[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/arm: smmu: move phys_addr_t definition to linux-compat.h



commit 35431ecb9db8c925a595f652dfbd1d2641bd2ff0
Author:     Federico Serafini <federico.serafini@xxxxxxxxxxx>
AuthorDate: Tue Dec 12 14:04:22 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Dec 12 14:04:22 2023 +0100

    xen/arm: smmu: move phys_addr_t definition to linux-compat.h
    
    Both smmu and smmu-v3 (ported from Linux) define the typedef name
    "phys_addr_t": move the type definition to the common header
    linux-compat.h to address violations of MISRA C:2012 Rule 5.6
    ("A typedef name shall be a unique identifier").
    No functional change.
    
    Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Suggested-by: Julien Grall <julien@xxxxxxx>
    Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 xen/drivers/passthrough/arm/smmu-v3.h | 1 -
 xen/drivers/passthrough/arm/smmu.c    | 1 -
 xen/include/xen/linux-compat.h        | 2 ++
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/passthrough/arm/smmu-v3.h 
b/xen/drivers/passthrough/arm/smmu-v3.h
index 05f6b1fb7e..f09048812c 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.h
+++ b/xen/drivers/passthrough/arm/smmu-v3.h
@@ -377,7 +377,6 @@
 
 /* Linux compatibility functions. */
 typedef paddr_t                dma_addr_t;
-typedef paddr_t                phys_addr_t;
 typedef unsigned int           gfp_t;
 
 /* Alias to Xen lock functions */
diff --git a/xen/drivers/passthrough/arm/smmu.c 
b/xen/drivers/passthrough/arm/smmu.c
index 11fc1d22ef..32e2ff279b 100644
--- a/xen/drivers/passthrough/arm/smmu.c
+++ b/xen/drivers/passthrough/arm/smmu.c
@@ -199,7 +199,6 @@ static inline int pci_for_each_dma_alias(struct pci_dev 
*pdev,
 
 /* Xen: misc */
 #define PHYS_MASK_SHIFT                PADDR_BITS
-typedef paddr_t phys_addr_t;
 
 #define VA_BITS                0       /* Only used for configuring stage-1 
input size */
 
diff --git a/xen/include/xen/linux-compat.h b/xen/include/xen/linux-compat.h
index 8d06bb6dc9..62ba71485c 100644
--- a/xen/include/xen/linux-compat.h
+++ b/xen/include/xen/linux-compat.h
@@ -17,4 +17,6 @@ typedef int16_t __s16;
 typedef int32_t __s32;
 typedef int64_t __s64;
 
+typedef paddr_t phys_addr_t;
+
 #endif /* __XEN_LINUX_COMPAT_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.