[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v2 06/13] xen/efi: fix violations of MISRA C:2012 Rule 7.2
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 6 Jul 2023 09:55:38 +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=nB3ss0zZcTG4ngDKW3KalbdWIcY/w9BdAoFh5Oojdxk=; b=khku9GNXLlY8doHc7QaCKSx62NVlRO3O28BFb2ayvNWYZmRi35SWwvnVr7m3Kxx11al6SyNx+1M9O2Iq7L3YeDKYL0B00g0QNZmdWYsNLCh8chSAqgRwzTHDW+/FxEOiIRZwpAv635ushjt/UYhACF+zdAyOwOEAbNRlSmsDWFb2HOOFhNgP51e1CUBB/GsP15LFq8GRjRF3sN6E71NkiP9sSkfdcLonJjuH9aehAVI6dvMXH7bApP3wrgjAqgyF1EJm8DfZ90tohKW9jFuBGD4E3ybn3Y+/nYCKhVAnUAorMNL0YUIpAjHU+uouwBbNWjgwT+JPFp3xbmJAmAkHpA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O11EvokaK/M0IK3w32tVu1czcNN1HXbYiV76e0q2WaXJhxfCKpcgtvMrUzn0HZ8WZBf7BvJ+SXpUegbW6eWklIOiN8y32NQuex+/OZ7T1FVS15Xbm6wFJQGGTG5HWExT9L7cfUX5leT18eEqFygMNXuGc403bX/lOFELIa6mx6R0yKQnk9594ygQdeuf5p/qmsA3MTTVn0OrAfAKOfB6fD8H5vh7QVCVbJiv0oUkpnIKlXxvwDr70dW+9ZgJIgEi19wos7lxQYHIBDEgvHN2SKckoB7Ys1652MJBTBAuX4HiH1cCcmuI20NpNtI+LSw14Ncl7MpdJmkceFNrScq8aA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, consulting@xxxxxxxxxxx, Gianluca Luparini <gianluca.luparini@xxxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <Xenia.Ragiadakou@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
- Delivery-date: Thu, 06 Jul 2023 07:55:50 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 06.07.2023 01:37, Stefano Stabellini wrote:
> On Wed, 5 Jul 2023, Simone Ballarin wrote:
>> --- a/xen/common/efi/boot.c
>> +++ b/xen/common/efi/boot.c
>> @@ -34,13 +34,13 @@
>> #define EFI_REVISION(major, minor) (((major) << 16) | (minor))
>>
>> #define SMBIOS3_TABLE_GUID \
>> - { 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3,
>> 0x94} }
>> + { 0xf2fd1544U, 0x9794U, 0x4a2cU, {0x99U, 0x2eU, 0xe5U, 0xbbU, 0xcfU,
>> 0x20U, 0xe3U, 0x94U} }
>> #define SHIM_LOCK_PROTOCOL_GUID \
>> - { 0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b,
>> 0x23} }
>> + { 0x605dab50U, 0xe046U, 0x4300U, {0xabU, 0xb6U, 0x3dU, 0xd8U, 0x10U,
>> 0xddU, 0x8bU, 0x23U} }
>> #define APPLE_PROPERTIES_PROTOCOL_GUID \
>> - { 0x91bd12fe, 0xf6c3, 0x44fb, { 0xa5, 0xb7, 0x51, 0x22, 0xab, 0x30, 0x3a,
>> 0xe0} }
>> + { 0x91bd12feU, 0xf6c3U, 0x44fbU, { 0xa5U, 0xb7U, 0x51U, 0x22U, 0xabU,
>> 0x30U, 0x3aU, 0xe0U} }
>> #define EFI_SYSTEM_RESOURCE_TABLE_GUID \
>> - { 0xb122a263, 0x3661, 0x4f68, {0x99, 0x29, 0x78, 0xf8, 0xb0, 0xd6, 0x21,
>> 0x80} }
>> + { 0xb122a263U, 0x3661U, 0x4f68U, {0x99U, 0x29U, 0x78U, 0xf8U, 0xb0U,
>> 0xd6U, 0x21U, 0x80U} }
>> #define EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOURCE_VERSION 1
>
> To be honest in these case I don't know if this is better or if it is
> better to add U only to the first numbers (0xf2fd1544U, 0x605dab50U,
> 0x91bd12feU, 0xb122a263U).
I'd prefer the latter, but I wonder whether that's in the spirit of Misra.
Jan
|