[PATCH v2, part1 03/29] mm/ARM: use common help functions to free reserved pages

Jiang Liu liuj97 at gmail.com
Sat Apr 6 10:07:15 EDT 2013


Hi Arnd,
	Missed some type casts for ARM. Could you please help check the patch at
http://marc.info/?l=linux-mm&m=136525654717201&w=2?
	Thanks!
	Gerry

On 04/04/2013 11:47 PM, Arnd Bergmann wrote:
> On Sunday 10 March 2013, Jiang Liu wrote:
>> Use common help functions to free reserved pages.
>>
>> Signed-off-by: Jiang Liu <jiang.liu at huawei.com>
>> Cc: Russell King <linux at arm.linux.org.uk>
>> Cc: Catalin Marinas <catalin.marinas at arm.com>
>> Cc: Will Deacon <will.deacon at arm.com>
>> Cc: linux-arm-kernel at lists.infradead.org
>> Cc: linux-kernel at vger.kernel.org
> 
> Hello Jiang Liu,
> 
> I'm getting a few new build warnings from this patch in linux-next, can you please
> have a look what's going on here? 
> 
>> @@ -609,8 +600,7 @@ void __init mem_init(void)
>>  
>>  #ifdef CONFIG_SA1111
>>  	/* now that our DMA memory is actually so designated, we can free it */
>> -	totalram_pages += free_area(PHYS_PFN_OFFSET,
>> -				    __phys_to_pfn(__pa(swapper_pg_dir)), NULL);
>> +	free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL);
>>  #endif
> 
> Using neponset_defconfig:
> 
> arch/arm/mm/init.c: In function 'mem_init':
> arch/arm/mm/init.c:603:2: warning: passing argument 1 of 'free_reserved_area' makes integer from pointer without a cast [enabled by default]
>   free_reserved_area(__va(PHYS_PFN_OFFSET), swapper_pg_dir, 0, NULL);
>   ^
> In file included from include/linux/mman.h:4:0,
>                  from arch/arm/mm/init.c:15:
> include/linux/mm.h:1301:22: note: expected 'long unsigned int' but argument is of type 'void *'
>  extern unsigned long free_reserved_area(unsigned long start, unsigned long end,
>                       ^
> 
>> @@ -738,16 +728,12 @@ void free_initmem(void)
>>  	extern char __tcm_start, __tcm_end;
>>  
>>  	poison_init_mem(&__tcm_start, &__tcm_end - &__tcm_start);
>> -	totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
>> -				    __phys_to_pfn(__pa(&__tcm_end)),
>> -				    "TCM link");
>> +	free_reserved_area(&__tcm_start, &__tcm_end, 0, "TCM link");
>>  #endif
> 
> Using one of {realview,s3c6400,u300}_defconfig:
> 
> /git/arm-soc/arch/arm/mm/init.c: In function 'free_initmem':
> /git/arm-soc/arch/arm/mm/init.c:731:2: warning: passing argument 1 of 'free_reserved_area' makes integer from pointer without a cast [enabled by default]
>   free_reserved_area(&__tcm_start, &__tcm_end, 0, "TCM link");
>   ^
> In file included from /git/arm-soc/include/linux/mman.h:4:0,
>                  from /git/arm-soc/arch/arm/mm/init.c:15:
> /git/arm-soc/include/linux/mm.h:1301:22: note: expected 'long unsigned int' but argument is of type 'char *'
>  extern unsigned long free_reserved_area(unsigned long start, unsigned long end,
>                       ^
> 
> 	Arnd
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 




More information about the linux-arm-kernel mailing list