@@ -570,8 +570,7 @@ int register_memory(struct memory_block *memory)
570
570
return ret ;
571
571
}
572
572
573
- static int init_memory_block (struct memory_block * * memory ,
574
- unsigned long block_id , unsigned long state )
573
+ static int init_memory_block (unsigned long block_id , unsigned long state )
575
574
{
576
575
struct memory_block * mem ;
577
576
unsigned long start_pfn ;
@@ -594,14 +593,12 @@ static int init_memory_block(struct memory_block **memory,
594
593
595
594
ret = register_memory (mem );
596
595
597
- * memory = mem ;
598
596
return ret ;
599
597
}
600
598
601
599
static int add_memory_block (unsigned long base_section_nr )
602
600
{
603
601
int section_count = 0 ;
604
- struct memory_block * mem ;
605
602
unsigned long nr ;
606
603
607
604
for (nr = base_section_nr ; nr < base_section_nr + sections_per_block ;
@@ -611,7 +608,7 @@ static int add_memory_block(unsigned long base_section_nr)
611
608
612
609
if (section_count == 0 )
613
610
return 0 ;
614
- return init_memory_block (& mem , base_memory_block_id (base_section_nr ),
611
+ return init_memory_block (base_memory_block_id (base_section_nr ),
615
612
MEM_ONLINE );
616
613
}
617
614
@@ -647,7 +644,7 @@ int create_memory_block_devices(unsigned long start, unsigned long size)
647
644
return - EINVAL ;
648
645
649
646
for (block_id = start_block_id ; block_id != end_block_id ; block_id ++ ) {
650
- ret = init_memory_block (& mem , block_id , MEM_OFFLINE );
647
+ ret = init_memory_block (block_id , MEM_OFFLINE );
651
648
if (ret )
652
649
break ;
653
650
}
0 commit comments