]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
docs/misra: add Rule 5.1
authorStefano Stabellini <stefano.stabellini@xilinx.com>
Wed, 1 Jun 2022 01:44:02 +0000 (18:44 -0700)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Wed, 8 Jun 2022 00:44:03 +0000 (17:44 -0700)
Add Rule 5.1, with the additional note that the character limit for Xen
is 40 characters.

The max length identifiers found by ECLAIR are:

__mitigate_spectre_bhb_clear_insn_start
domain_pause_by_systemcontroller_nosync

Both of them are 40 characters long.

Explicitly mention that public headers might have longer identifiers.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Acked-by: Julien Grall <jgrall@amazon.com>
docs/misra/rules.rst

index 7d6a9fe063b90bf57d4f05626b08ec2a93057aee..6ccff07765f0e392e79c2db32462e1fed637cb87 100644 (file)
@@ -82,6 +82,13 @@ existing codebase are work-in-progress.
      - Line-splicing shall not be used in // comments
      -
 
+   * - `Rule 5.1 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_05_01_2.c>`_
+     - Required
+     - External identifiers shall be distinct
+     - The Xen characters limit for identifiers is 40. Public headers
+       (xen/include/public/) are allowed to retain longer identifiers
+       for backward compatibility.
+
    * - `Rule 6.2 <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_06_02.c>`_
      - Required
      - Single-bit named bit fields shall not be of a signed type