| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: [XEN PATCH][for-4.19] xen: replace occurrences of SAF-1-safe with asmlinkage attribute
 
To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxxFrom: Julien Grall <julien@xxxxxxx>Date: Mon, 6 Nov 2023 22:57:26 +0000Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, jbeulich@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, roger.pau@xxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>Delivery-date: Mon, 06 Nov 2023 22:57:37 +0000List-id: Xen developer discussion <xen-devel.lists.xenproject.org> 
 
Hi Nicola,
On 03/11/2023 18:05, Nicola Vetrini wrote:
 
The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced
by the asmlinkage pseudo-attribute, for the sake of uniformity.
The deviation with a comment based on the SAF framework is also
mentioned as a last resort.
 
I don't see any reason to keep SAF-1 after this patch. So can this be 
removed? 
 
Add missing 'xen/compiler.h' #include-s where needed.
The text in docs/misra/deviations.rst is modified to reflect this change.
Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
---
  docs/misra/deviations.rst   |  6 +++---
  xen/arch/arm/cpuerrata.c    |  7 +++----
  xen/arch/arm/setup.c        |  5 ++---
  xen/arch/arm/smpboot.c      |  3 +--
  xen/arch/arm/traps.c        | 21 +++++++--------------
  xen/arch/x86/boot/cmdline.c |  5 +++--
  xen/arch/x86/boot/reloc.c   |  7 ++++---
  xen/arch/x86/extable.c      |  3 +--
  xen/arch/x86/setup.c        |  3 +--
  xen/arch/x86/traps.c        | 27 +++++++++------------------
  xen/common/efi/boot.c       |  5 ++---
  11 files changed, 36 insertions(+), 56 deletions(-)
diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst
index d468da2f5ce9..ed5d36c08647 100644
--- a/docs/misra/deviations.rst
+++ b/docs/misra/deviations.rst
@@ -134,9 +134,9 @@ Deviations related to MISRA C:2012 Rules:
       - Tagged as `safe` for ECLAIR.
* - R8.4
-     - Functions and variables used only by asm modules are either marked with
-       the `asmlinkage` macro or with a SAF-1-safe textual deviation
-       (see safe.json).
 
I thought we agreed to a different wording [1]. So is this really based 
on last version? 
 
+     - Functions and variables used only to interface with asm modules should
+       be marked with the `asmlinkage` macro. If that's not possible, consider
+       using the SAF-1-safe textual deviation (see safe.json).
 
See above. Actually, I am a bit surprised that SAF-1 is still mentioned 
given that I have now requested multiple that it should be removed and I 
haven't yet seen a reason to keep it. 
Cheers,
[1] 
https://lore.kernel.org/all/b914ac93-2499-4bfd-a60a-51a9f1c170ec@xxxxxxx/ 
--
Julien Grall
 
 |