[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: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 21 Jun 2023 09:06:02 +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=+IqZgYnm2a7/wwnhZzWE/gplCz+zZ7qf+x+faUfejNQ=; b=jO5p96pL8+OkRqjwpC1EL9fE35PV3j05lvUUBxM6O5i9fiO1ab/mRVIXHjaU/xJFcxjTuNcA9A601VYy8fbyINLEFdjDt5mIS4gOfuMhjcIuw2NzlZpd1vG29vxJq/nl6ZcX8TgU4raKaXhADy2qQQ9lm08K3WxnPjjamhDapIQAdkSZ6tdiabs0pWE4uBRZE1ecMYwoL8MStacqYJaq/2zakPUPksBInitlgdabqk603bUvW93udBzzlwDVjrRT5nafGuKxFhoZ6vOhJVrySHuaEIEkHeKuMgQlugcSypkP2Pq+a5mifubfUXJjkEnehdn3JAmvSwvYUeLXJXXZXw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jny5iMPQYa3KuIR6b9qgtcod+FftPR3ts89urDdsPSlkXrA7Oxy02yFf/Jkk8soKOsLuJJtHTqsG0kKvypCqYQUAOcadim65HISuXkeCHGGzN0bjihK3Enw+IPE9cgUvERJrm4AlimMvECV614lOeHuvcvV6DJQjrQyvKzqwHTeBVYnm6+wut9E09orL88u7nBN6llnTI7CXbpKNuCqXUm9i85Csgu/oSloR+Jiwqyb4Iq8hesLKSf759Y7nMS8xPiARhAnPsqfJ0jm2WLMkJTF48lBgxV9JA2WxofRtY7U0BsDYICNXa25PM/yUUwpkc925TCrYCLnj3UC8p9Tbpg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>, 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 07:06: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



 


Rackspace

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