|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 1/2] xen/page_alloc: address violation of Rule 14.3
From: Federico Serafini <federico.serafini@xxxxxxxxxxx>
MISRA C Rule 14.3 states that "Controlling expressions shall not be
invariant".
Change the #define to static inline to resolve the violation.
Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
Signed-off-by: Victor Lira <victorm.lira@xxxxxxx>
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index bd4538c28d..9ee1506703 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -2005,7 +2005,10 @@ static unsigned long __initdata buddy_alloc_size =
MB(CONFIG_BUDDY_ALLOCATOR_SIZE);
size_param("buddy-alloc-size", buddy_alloc_size);
#else
-#define domain_num_llc_colors(d) 0
+static inline unsigned int domain_num_llc_colors(const struct domain *d)
+{
+ return 0;
+}
#define domain_llc_color(d, i) 0
#endif
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |