Re: [PATCH] Drop superfluous casts in nr_free_pages() callers

From: Amerigo Wang
Date: Mon Aug 03 2009 - 23:14:26 EST


On Mon, Aug 03, 2009 at 06:11:42PM +0200, Geert Uytterhoeven wrote:
>Commit 96177299416dbccb73b54e6b344260154a445375 ("Drop free_pages()")
>modified nr_free_pages() to return 'unsigned long' instead of 'unsigned int'.
>This made the casts to 'unsigned long' in most callers superfluous, hence
>remove them.
>
>Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@xxxxxxxxxxx>
>---

>diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
>index 61d7e61..a5d5e70 100644
>--- a/arch/um/kernel/mem.c
>+++ b/arch/um/kernel/mem.c
>@@ -77,7 +77,7 @@ void __init mem_init(void)
> num_physpages = totalram_pages;
> max_pfn = totalram_pages;
> printk(KERN_INFO "Memory: %luk available\n",
>- (unsigned long) nr_free_pages() << (PAGE_SHIFT-10));
>+ nr_free_pages() << (PAGE_SHIFT-10));
> kmalloc_ok = 1;
>
> #ifdef CONFIG_HIGHMEM

Since it is fine for other arch, um too.

Acked-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/