[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH 06/13] xen/efi: fixed violations of MISRA C:2012 Rule 7.2
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
- Date: Wed, 21 Jun 2023 11:27:57 +0200
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, consulting@xxxxxxxxxxx, Gianluca Luparini <gianluca.luparini@xxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <Xenia.Ragiadakou@xxxxxxx>, Ayan Kumar <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 21 Jun 2023 09:28:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 20.06.2023 22:56, Stefano Stabellini wrote:
> On Tue, 20 Jun 2023, Jan Beulich wrote:
>> On 20.06.2023 12:34, Simone Ballarin wrote:
>>> From: Gianluca Luparini <gianluca.luparini@xxxxxxxxxxx>
>>>
>>> The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline states:
>>> "A "u" or "U" suffix shall be applied to all integer constants that are represented in an unsigned type".
>>>
>>> I propose to use "U" as a suffix to explicitly state when an integer constant is represented in an unsigned type.
>>> For homogeneity, I also added the "U" suffix in some cases that the tool didn't report as violations.
>>>
>>> Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
>>> ---
>>> xen/arch/x86/include/asm/x86_64/efibind.h | 10 +++++-----
>>
>> This file as well as ...
>>
>>> xen/common/efi/boot.c | 8 ++++----
>>> xen/common/efi/runtime.c | 2 +-
>>> xen/include/efi/efiapi.h | 10 +++++-----
>>> xen/include/efi/efidef.h | 2 +-
>>> xen/include/efi/efiprot.h | 22 +++++++++++-----------
>>
>> ... the last three here are imported from the gnu-efi package. I'm wary
>> of touching them, and thus getting them more out of sync with their
>> original than strictly necessary. To allow the other changes to go in
>> no matter what, I'd like to suggest splitting the patch.
>
> Should we add either those files individually or the directory
> xen/include/efi (plus xen/arch/x86/include/asm/x86_64/efibind.h) to
> docs/misra/exclude-list.json ?
Probably, and in the former case imo the entire directory.
Jan
Ok, I will remove all the changes in the "xen/include/efi" directory and "xen/arch/x86/include/asm/x86_64/efibind.h". --
|