[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 9/9] drivers/acpi: Use explicitly specified types
- To: Michal Orzel <michal.orzel@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 22 Jun 2022 13:45:08 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6ruDuU7s8jqWCHuZ9KyMVhPKXPTUir8i63pED/xwDmM=; b=CbQ6za2HneH2rwtw/rBCpzKNJUJTk0+3RoQoWODg+44j4o9xeY5c4Zg4t0D49fmkm0sfeINJVJuMqC4ZCYaPL+0xw1nyCENQUiL39JO1wkoRHj46NAMbsRi+FhCabkBuytaP6ccbq5UIdiwP5TuNbjJmKp6alhTnEd6hjUJBoYYL8mGt6Il5LW2V+4mwJw8U25d1TxAypafIxZuBddlFP8UqghO1JJgYRYu3w/DPlTHfboBfuqSnwnrWPXz9TQNNCZ+vY2gcXuIAAoLgAsLQegNyTGalBi3CKbI7DrIW0kJnSqN480Duny4Qw+n/KOOEoq6UALVoUgJ/oKgYgUXevQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ve7+wSibFQnMqErN57DDewXrexvysNbPM/L4AGESjeuZPLSHsO7tQw1A//aKDkXQtlUo50mI/ZeWHv3xBKraY7D3bzyP9yuAHeoKHxmZJ7W0YHrerFtma3yLSAO+1zfuMmy9WsRhMtnabZyHpRqPd8OLeXh+J/rmC2kFhdiRsiF4nK76kLw9D8IIEvws1E/aLnj3xxSvSSXDbKYIlI4SxGXCC5waWJHi/ndDsNWvDcHNuY7lygJoc13ytWK4xIxS4Ow1mTx8EicdxpQ+v9+pRbAHcXvidliiYFJNKvrqs7ovqmdzZnIHDENyOD4eFHxE2mCDS65I7Knew13ZLtORLQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 22 Jun 2022 11:45:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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
|