From: Xenia Ragiadakou Date: Tue, 28 Jun 2022 15:06:37 +0000 (+0200) Subject: page_alloc: fix MISRA C 2012 Rule 8.7 violation X-Git-Tag: archive/raspbian/4.17.0-1+rpi1^2~33^2~508 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=56ff13f640b400f5e68e0450b7b24f6deae13b63;p=xen.git page_alloc: fix MISRA C 2012 Rule 8.7 violation 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 also aims to resolve indirectly a MISRA C 2012 Rule 8.4 violation warning. Signed-off-by: Xenia Ragiadakou Reviewed-by: Jan Beulich --- 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