All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH] xen/mem_access: address violations of MISRA C: 2012 Rule 8.4
@ 2024-04-29 15:45 Alessandro Zucchelli
  2024-04-29 15:58 ` Jan Beulich
  0 siblings, 1 reply; 8+ messages in thread
From: Alessandro Zucchelli @ 2024-04-29 15:45 UTC (permalink / raw)
  To: xen-devel
  Cc: consulting, Alessandro Zucchelli, Tamas K Lengyel,
	Alexandru Isaila, Petre Pircalabu

Change #ifdef CONFIG_MEM_ACCESS by OR-ing defined(CONFIG_ARM),
allowing asm/mem_access.h to be included in all ARM build configurations.
This is to address the violation of MISRA C: 2012 Rule 8.4 which states:
"A compatible declaration shall be visible when an object or function
with external linkage is defined". Functions p2m_mem_access_check
and p2m_mem_access_check_and_get_page when CONFIG_MEM_ACCESS is not
defined in ARM builds don't have visible declarations in the file
containing their definitions.

Signed-off-by: Alessandro Zucchelli <alessandro.zucchelli@bugseng.com>
---
 xen/include/xen/mem_access.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/xen/mem_access.h b/xen/include/xen/mem_access.h
index 87d93b31f6..ec0630677d 100644
--- a/xen/include/xen/mem_access.h
+++ b/xen/include/xen/mem_access.h
@@ -33,7 +33,7 @@
  */
 struct vm_event_st;
 
-#ifdef CONFIG_MEM_ACCESS
+#if defined(CONFIG_MEM_ACCESS) || defined(CONFIG_ARM)
 #include <asm/mem_access.h>
 #endif
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-08 17:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 15:45 [XEN PATCH] xen/mem_access: address violations of MISRA C: 2012 Rule 8.4 Alessandro Zucchelli
2024-04-29 15:58 ` Jan Beulich
2024-05-03  7:09   ` Alessandro Zucchelli
2024-05-03  9:32     ` Julien Grall
2024-05-08 14:02       ` Alessandro Zucchelli
2024-05-08 16:01         ` Tamas K Lengyel
2024-05-08 16:26           ` Julien Grall
2024-05-08 17:00             ` Tamas K Lengyel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.