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

[PATCH 9/9] drivers/acpi: Use explicitly specified types



According to MISRA C 2012 Rule 8.1, types shall be explicitly
specified. Fix all the findings reported by cppcheck with misra addon
by substituting implicit type 'unsigned' to explicit 'unsigned int'.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
This patch may not be applicable as these files come from Linux.
---
 xen/drivers/acpi/tables/tbfadt.c  | 2 +-
 xen/drivers/acpi/tables/tbutils.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/acpi/tables/tbfadt.c b/xen/drivers/acpi/tables/tbfadt.c
index f11fd5a900..ad55cd769a 100644
--- a/xen/drivers/acpi/tables/tbfadt.c
+++ b/xen/drivers/acpi/tables/tbfadt.c
@@ -235,7 +235,7 @@ void __init acpi_tb_create_local_fadt(struct 
acpi_table_header *table, u32 lengt
                ACPI_WARNING((AE_INFO,
                              "FADT (revision %u) is longer than ACPI 5.0 
version,"
                              " truncating length %u to %zu",
-                             table->revision, (unsigned)length,
+                             table->revision, (unsigned int)length,
                              sizeof(struct acpi_table_fadt)));
        }
 
diff --git a/xen/drivers/acpi/tables/tbutils.c 
b/xen/drivers/acpi/tables/tbutils.c
index d135a50ff9..ddb7f628c9 100644
--- a/xen/drivers/acpi/tables/tbutils.c
+++ b/xen/drivers/acpi/tables/tbutils.c
@@ -481,7 +481,7 @@ acpi_tb_parse_root_table(acpi_physical_address 
rsdp_address, u8 flags)
                        if (ACPI_FAILURE(status)) {
                                ACPI_WARNING((AE_INFO,
                                              "Truncating %u table entries!",
-                                             (unsigned)
+                                             (unsigned int)
                                              (acpi_gbl_root_table_list.size -
                                               acpi_gbl_root_table_list.
                                               count)));
-- 
2.25.1




 


Rackspace

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