[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH 00/13] xen: fixed violations of MISRA C:2012 Rule 7.2


  • To: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 20 Jun 2023 15:09:04 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=ZnH3awvM4WqAkaJrdKS1x7NIXDtHHF/z8us4HOaa628=; b=FSdb54pT+qUHr4WksSyRbt0+WhUH1LSYnPLGKgRLbuXOpL/rSmaBX/YMwfwzt+/LmpLgvuqcI4Z1ROX93XQTV3LifKDiqiJAY8cHc+J51Dq4p+J1lennti3ukWHcgcuPv3WzptXuMC3fAv4DRwdlb6ypQE+czBitQEjsUtLusH6l4iK/sLKLoMhdKC+BQG6YkTZ5OnlhxDWIyERuVqXD29QrgZqMBqrL8vOaC1qzPQacZ2apK5vm5MTg9r1EIcrmMI+pRtdsDpoPTxKbseSeoMxznzDbreeqmh1eiXrU69SOTHDZV6Gk8WPVCg6ax0GDajaiquOw2XPAiGSKGu9P+Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ag0HJ+eUtv84PWGYfSDvI0XqWd4eJTcvoDEFWKizHD4mCOVrC/x6T3dXHiSSnJ/UsLzx4lVopp5FqWBSj2WWHGwFGPuvl7TYOZDx5OP7KQcP1xkNm6vhqz4PrXuZb/qF3Id2CEYsjxDsD+RY+VE60usp+5UCqXZZzJyT0CY4JlrVh00vsa+Zju9H0Ap7AYOePZMAd4O3zgrFEN3u3AdlPQhmqgZlrctHymoPyNX8Lk22Z/rb4HL7tNrB+QOMhPtu2n9jt98YGNxaKPsyWAU0k99dRj2pO7nV1gA3j9850KRBvbsaAWMvNMaBOp/FcqHiEB8izMCyUTpNLnsaryTZmQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, consulting@xxxxxxxxxxx, Gianluca Luparini <gianluca.luparini@xxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <Xenia.Ragiadakou@xxxxxxx>, Ayan Kumar <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Tue, 20 Jun 2023 13:09:37 +0000
  • Ironport-data: A9a23:7J1RP6JZMmHIWy64FE+RY5UlxSXFcZb7ZxGr2PjKsXjdYENSg2QPz 2AbCmjQPPeMYWGhc9Elbo2y8kJU7Z7QmoMwT1FlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/rOHvykU7Ss1hlZHWdMUD0mhQ9oh9k3i4tphcnRKw6Ws Jb5rta31G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SGDImCyO2sY40p e2m3waCG54bHV09UYDRde6lyE63sT4FguVuUkDUI95VPkLx7IxtLC+3hfgySy0RFSj+KvKh/ 17+KX8lSSPl+ufZLPGhaXi4krqU
  • Ironport-hdrordr: A9a23:J5sKO61rhf9AOAI851A5ugqjBJgkLtp133Aq2lEZdPUMSL38qy iv9M536faGskd0ZJhAo6H5BEDuexLhHPJOirX5eI3SPjUO21HYV72Kj7GD/9SIIUSXygce79 YCT0EUMrHN5C1B4/oSlzPWLz9P+rO6GeuT9IDjJj9WPGdXgo9bnn5ENjo=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jun 20, 2023 at 12:34:52PM +0200, 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".
> 
> These violations are caused by the missing "u" or "U" suffix in unsigned 
> integer constants, such as:
> 
> xen/arch/x86/hvm/hypercall.c:132.17-132.26
> if ( (eax & 0x80000000) && is_viridian_domain(currd) )
> 
> The patches in this series achieve compliance for MISRA C:2012 Rule 7.2
> by adding the "U" suffix to explicitly state when an integer constant is
> represented in an unsigned type.

I wonder if there should be a patch to CODING_STYLE also as part of
the series?

I know it's in misra/rules.rst, but still it's something that could
easily be added to the CODING_STYLE, unlike other rules that are more
abstract.

We could also settle on whether to use lowercase or uppercase suffixes
uniformly.

Thanks, Roger.



 


Rackspace

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