On 22.06.2022 13:09, Michal Orzel wrote: > On 22.06.2022 12:36, Jan Beulich wrote: >> On 20.06.2022 09:02, Michal Orzel wrote: >>> --- 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))); >> >> Same here then, except PRIu32 wouldn't be correct to use in this case. >> > Why is it so given that both size and count are of type u32?
Because the promoted type (i.e. the type of the result of the subtraction) isn't uint32_t (and will never be). It'll be "unsigned int" when sizeof(int) == 4 (and in this case it'll happen to alias uint32_t) and just "int" when sizeof(int) > 4 (not even aliasing int32_t). Jan