From 8c1cc69748f4719e6ba8a275c2ecd60747c52c21 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Tue, 31 May 2022 18:44:02 -0700 Subject: [PATCH] docs/misra: add Rule 5.1 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 Acked-by: Julien Grall --- docs/misra/rules.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 7d6a9fe063..6ccff07765 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -82,6 +82,13 @@ existing codebase are work-in-progress. - Line-splicing shall not be used in // comments - + * - `Rule 5.1 `_ + - 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 `_ - Required - Single-bit named bit fields shall not be of a signed type -- 2.39.5