diff mbox series

[1/5] xen/common: page_alloc: Fix MISRA C 2012 Rule 8.7 violation

Message ID 20220626211131.678995-2-burzalodowa@gmail.com (mailing list archive)
State Superseded
Headers show
Series Fix MISRA C 2012 violations | expand

Commit Message

Xenia Ragiadakou June 26, 2022, 9:11 p.m. UTC
The variables page_offlined_list and page_broken_list are referenced only
in page_alloc.c.
Change their linkage from external to internal by adding the storage-class
specifier static to their definitions.

This patch aims to resolve indirectly a MISRA C 2012 Rule 8.4 violation warning.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
---
 xen/common/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jan Beulich June 27, 2022, 7:07 a.m. UTC | #1
On 26.06.2022 23:11, Xenia Ragiadakou wrote:
> The variables page_offlined_list and page_broken_list are referenced only
> in page_alloc.c.
> Change their linkage from external to internal by adding the storage-class
> specifier static to their definitions.
> 
> This patch aims to resolve indirectly a MISRA C 2012 Rule 8.4 violation warning.
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 000ae6b972..fe0e15429a 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -235,9 +235,9 @@  static unsigned int dma_bitsize;
 integer_param("dma_bits", dma_bitsize);
 
 /* Offlined page list, protected by heap_lock. */
-PAGE_LIST_HEAD(page_offlined_list);
+static PAGE_LIST_HEAD(page_offlined_list);
 /* Broken page list, protected by heap_lock. */
-PAGE_LIST_HEAD(page_broken_list);
+static PAGE_LIST_HEAD(page_broken_list);
 
 /*************************
  * BOOT-TIME ALLOCATOR