Thread (8 messages) read the whole thread 8 messages, 8 authors, 2009-08-08

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

From: Amerigo Wang <hidden>
Date: 2009-08-04 03:14:04
Also in: lkml

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 <redacted>
---
quoted hunk ↗ jump to hunk
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 <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help