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

[xen master] misra: note the plan to remove the R2.1 deviation for unreferenced functions



commit edc7a31331f2d1d2131c38555e9b435042a7c0f9
Author:     Stefano Stabellini <stefano.stabellini@xxxxxxx>
AuthorDate: Tue Nov 17 14:50:12 2026 -0800
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxx>
CommitDate: Wed Nov 18 16:39:03 2026 -0800

    misra: note the plan to remove the R2.1 deviation for unreferenced functions
    
    The ECLAIR deviation of MC3A2.R2.1 for functions that are never
    referenced has a one-line justification and no entry in
    docs/misra/deviations.rst. Note that gc-sections support in the Xen
    build is to be introduced, so that such functions are discarded from the
    final binary and the deviation can be removed for them, and add the
    matching deviations.rst entry.
    
    Requested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 automation/eclair_analysis/ECLAIR/deviations.ecl | 5 ++++-
 docs/misra/deviations.rst                        | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl 
b/automation/eclair_analysis/ECLAIR/deviations.ecl
index d49af53055..58af4fb5cd 100644
--- a/automation/eclair_analysis/ECLAIR/deviations.ecl
+++ b/automation/eclair_analysis/ECLAIR/deviations.ecl
@@ -8,7 +8,10 @@ Constant expressions and unreachable branches of if and switch 
statements are ex
 -config=MC3A2.R2.1,+reports={safe,"first_area(^.*incompatible with labeled 
statement$)"}
 -doc_end
 
--doc_begin="Some functions are intended to be not referenced."
+-doc_begin="Some functions are intended to be not referenced.
+Support for gc-sections in the Xen build is intended to be introduced, so that
+such functions are discarded from the final binary and this deviation can be
+removed for them."
 -config=MC3A2.R2.1,+reports={deliberate,"first_area(^.*is never referenced$)"}
 -doc_end
 
diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst
index 7b983db264..c17b447543 100644
--- a/docs/misra/deviations.rst
+++ b/docs/misra/deviations.rst
@@ -64,6 +64,13 @@ Deviations related to MISRA C:2012 Rules:
        statements are expected.
      - Tagged as `safe` for ECLAIR.
 
+   * - R2.1
+     - Some functions are intended to be not referenced.
+       Support for gc-sections in the Xen build is intended to be introduced,
+       so that such functions are discarded from the final binary and this
+       deviation can be removed for them.
+     - Tagged as `deliberate` for ECLAIR.
+
    * - R2.1
      - Unreachability caused by calls to the following functions or macros is
        deliberate and there is no risk of code being unexpectedly left out.
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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