mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
hv: treewide: fix 'Variable should be declared static'
Declare a variable with the static qualifier if it is of file scope and not used in another file. v1 -> v2: * remove the unnecessary change to the following variables, which is due to the report issue struct multiboot_info *mbi = (struct multiboot_info *) (HPA2HVA((uint64_t)boot_regs[1])); struct multiboot_mmap *mmap = (struct multiboot_mmap *) HPA2HVA((uint64_t)mbi->mi_mmap_addr); Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -20,7 +20,7 @@ Malloc_Heap[CONFIG_HEAP_SIZE] __aligned(CONFIG_MALLOC_ALIGN);
|
||||
static uint32_t Malloc_Heap_Bitmap[MALLOC_HEAP_BITMAP_SIZE];
|
||||
static uint32_t Malloc_Heap_Contiguity_Bitmap[MALLOC_HEAP_BITMAP_SIZE];
|
||||
|
||||
struct mem_pool Memory_Pool = {
|
||||
static struct mem_pool Memory_Pool = {
|
||||
.start_addr = Malloc_Heap,
|
||||
.spinlock = {.head = 0U, .tail = 0U},
|
||||
.size = CONFIG_HEAP_SIZE,
|
||||
@@ -44,7 +44,7 @@ Paging_Heap[CONFIG_NUM_ALLOC_PAGES][CPU_PAGE_SIZE] __aligned(CPU_PAGE_SIZE);
|
||||
static uint32_t Paging_Heap_Bitmap[PAGING_HEAP_BITMAP_SIZE];
|
||||
static uint32_t Paging_Heap_Contiguity_Bitmap[MALLOC_HEAP_BITMAP_SIZE];
|
||||
|
||||
struct mem_pool Paging_Memory_Pool = {
|
||||
static struct mem_pool Paging_Memory_Pool = {
|
||||
.start_addr = Paging_Heap,
|
||||
.spinlock = {.head = 0U, .tail = 0U},
|
||||
.size = CONFIG_NUM_ALLOC_PAGES * CPU_PAGE_SIZE,
|
||||
|
Reference in New Issue
Block a user