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

Re: [PATCH v2] docs/misra: new rules addition


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 12 Jun 2023 09:33:22 +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=tYuIqNwdinNyLWneghhdDOqgXZoEXvbEJbWjwAar1WY=; b=lDiCZ9ypWwxatCl0hyrkMgi9g4DeEmZ8q5B7lNuIbGpTne2Xl8GMLl+UqaYBPuvWBcPM7xjvSMvMmlbwANdgizb/rfyN/aC1o842IXQPW+ISlhNlvIamFk6O73FyA8K+agN6y4NNBqy43r5mXqIl4s3XhxKocIzhY47ubkkHD7dgXgtOmTklZLiZGGssrv8V5Eyz04AEJAWhvxtOfwRJ7sXIr374QFTE2G2I9K5aenl3h7N5g9QXtD+flytkhhVjpnIsI3VgaI0eggYAOS+ea/lV/7nl41u1osdeWQI/JyPtWtk1D7mmgRUgacEPPBCdeWK06OEOhoLwm1or3/nDsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XJYM/Gj1jsF/4j8psxNClogJuOSaMnuy7RVaWoGulwaOxNLPQpgFQjvqD8LbWX1FUtS9xrpajLmjVQfNl2KZD5xBpVuwPHvOqAhf8QNw34APJV0rU4YsZ5oMOnx2bW8s5eIVmHFxC8Aq8T9QVG3gHmZJXPBmMdvwvWFbLMf0/g82Ia8r7yRQkVrCQBBrfpHxgxJCdOzQdkke/9MelEH9Qu+ZRfoAsg5TVPP9uOoE6FaFrmolkk7MBHK/JJg/ZRUm4YKkXY/CUyU9KOLuylKtHBUdOdilgaDSVmxJxzEju/tqmls6OfCsuJf8PFB9lye2Diy2t7qhjnl2cGP66wQQsA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: julien@xxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, bertrand.marquis@xxxxxxx, roberto.bagnara@xxxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 12 Jun 2023 07:33:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.06.2023 19:45, Stefano Stabellini wrote:
> @@ -133,6 +146,13 @@ existing codebase are work-in-progress.
>         headers (xen/include/public/) are allowed to retain longer
>         identifiers for backward compatibility.
>  
> +   * - `Rule 6.1 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_06_01.c>`_
> +     - Required
> +     - Bit-fields shall only be declared with an appropriate type
> +     - In addition to the C99 types, we also consider appropriate types:
> +       unsigned char, unsigned short, unsigned long, unsigned long long,
> +       enum.

What about their signed equivalents? I'm surprised that I found only very
few uses (in Arm insn decoding afaict), but they generally have a purpose.
Are the uses we have (and new ones which may appear) intended to become
deviations?

> @@ -143,6 +163,12 @@ existing codebase are work-in-progress.
>       - Octal constants shall not be used
>       -
>  
> +   * - `Rule 7.2 
> <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_02.c>`_
> +     - Required
> +     - A "u" or "U" suffix shall be applied to all integer constants
> +       that are represented in an unsigned type
> +     -

I continue to consider "represented in" problematic here without
further qualification.

> @@ -314,6 +340,11 @@ existing codebase are work-in-progress.
>         used following a subsequent call to the same function
>       -
>  
> +   * - Rule 21.21
> +     - Required
> +     - The Standard Library function system of <stdlib.h> shall not be used
> +     -

Still no "inapplicable" note (whichever way it would be worded to also
please Roberto)?

Jan



 


Rackspace

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