|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xen/page_alloc: address violation of Rule 14.3
commit ec050fb80ce5cb4f0c720897c04ae6ad38411329
Author: Federico Serafini <federico.serafini@xxxxxxxxxxx>
AuthorDate: Fri May 9 16:28:07 2025 -0700
Commit: Stefano Stabellini <stefano.stabellini@xxxxxxx>
CommitDate: Fri May 9 16:29:15 2025 -0700
xen/page_alloc: address violation of Rule 14.3
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>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/common/page_alloc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index bd4538c28d..e57a287133 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
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |