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

[PATCH 3/5] AMD/IOMMU: address violations of MISRA C:2012 Rule 11.8



From: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>

Add missing const qualifier in casting to comply with Rule 11.8.
The type of the formal parameter ivhd_block is const qualified.
No functional change.

Signed-off-by: Maria Celeste Cesario  <maria.celeste.cesario@xxxxxxxxxxx>
Signed-off-by: Simone Ballarin  <simone.ballarin@xxxxxxxxxxx>
---
 xen/drivers/passthrough/amd/iommu_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c 
b/xen/drivers/passthrough/amd/iommu_acpi.c
index 699d33f429..00923a6bb5 100644
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
@@ -1232,7 +1232,7 @@ static int __init get_last_bdf_ivhd(
     while ( ivhd_block->header.length >=
             (block_length + sizeof(struct acpi_ivrs_de_header)) )
     {
-        ivhd_device = (const void *)((u8 *)ivhd_block + block_length);
+        ivhd_device = (const void *)((const uint8_t *)ivhd_block + 
block_length);
 
         switch ( ivhd_device->header.type )
         {
-- 
2.40.0




 


Rackspace

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