arches: drop superfluous casts in nr_free_pages() callers
Geert Uytterhoeven [Tue, 22 Sep 2009 00:02:36 +0000 (17:02 -0700)]
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,
so remove them.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Chris Zankel <zankel@tensilica.com>
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

20 files changed:
arch/alpha/mm/init.c
arch/alpha/mm/numa.c
arch/arm/mm/init.c
arch/avr32/mm/init.c
arch/cris/mm/init.c
arch/ia64/mm/init.c
arch/m32r/mm/init.c
arch/m68k/mm/init.c
arch/microblaze/mm/init.c
arch/mips/mm/init.c
arch/mn10300/mm/init.c
arch/parisc/mm/init.c
arch/powerpc/mm/mem.c
arch/s390/mm/init.c
arch/sh/mm/init.c
arch/sparc/mm/init_32.c
arch/um/kernel/mem.c
arch/x86/mm/init_32.c
arch/x86/mm/init_64.c
arch/xtensa/mm/init.c

index af71d38..a0902c2 100644 (file)
@@ -299,7 +299,7 @@ printk_memory_info(void)
        initsize =  (unsigned long) &__init_end - (unsigned long) &__init_begin;
 
        printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, %luk data, %luk init)\n",
-              (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               max_mapnr << (PAGE_SHIFT-10),
               codesize >> 10,
               reservedpages << (PAGE_SHIFT-10),
index 0eab557..10b4035 100644 (file)
@@ -349,7 +349,7 @@ void __init mem_init(void)
 
        printk("Memory: %luk/%luk available (%luk kernel code, %luk reserved, "
               "%luk data, %luk init)\n",
-              (unsigned long)nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               num_physpages << (PAGE_SHIFT-10),
               codesize >> 10,
               reservedpages << (PAGE_SHIFT-10),
index ea36186..f982606 100644 (file)
@@ -596,8 +596,8 @@ void __init mem_init(void)
 
        printk(KERN_NOTICE "Memory: %luKB available (%dK code, "
                "%dK data, %dK init, %luK highmem)\n",
-               (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
-               codesize >> 10, datasize >> 10, initsize >> 10,
+               nr_free_pages() << (PAGE_SHIFT-10), codesize >> 10,
+               datasize >> 10, initsize >> 10,
                (unsigned long) (totalhigh_pages << (PAGE_SHIFT-10)));
 
        if (PAGE_SIZE >= 16384 && num_physpages <= 128) {
index e819fa6..376f18c 100644 (file)
@@ -141,7 +141,7 @@ void __init mem_init(void)
 
        printk ("Memory: %luk/%luk available (%dk kernel code, "
                "%dk reserved, %dk data, %dk init)\n",
-               (unsigned long)nr_free_pages() << (PAGE_SHIFT - 10),
+               nr_free_pages() << (PAGE_SHIFT - 10),
                totalram_pages << (PAGE_SHIFT - 10),
                codesize >> 10,
                reservedpages << (PAGE_SHIFT - 10),
index 514f46a..ff68b9f 100644 (file)
@@ -54,7 +54,7 @@ mem_init(void)
         printk(KERN_INFO
                "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, "
               "%dk init)\n" ,
-              (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               max_mapnr << (PAGE_SHIFT-10),
               codesize >> 10,
               reservedpages << (PAGE_SHIFT-10),
index b115b3b..1d28624 100644 (file)
@@ -655,7 +655,7 @@ mem_init (void)
        initsize =  (unsigned long) __init_end - (unsigned long) __init_begin;
 
        printk(KERN_INFO "Memory: %luk/%luk available (%luk code, %luk reserved, "
-              "%luk data, %luk init)\n", (unsigned long) nr_free_pages() << (PAGE_SHIFT - 10),
+              "%luk data, %luk init)\n", nr_free_pages() << (PAGE_SHIFT - 10),
               num_physpages << (PAGE_SHIFT - 10), codesize >> 10,
               reserved_pages << (PAGE_SHIFT - 10), datasize >> 10, initsize >> 10);
 
index 24d429f..9f581df 100644 (file)
@@ -171,7 +171,7 @@ void __init mem_init(void)
 
        printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
                "%dk reserved, %dk data, %dk init)\n",
-               (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                num_physpages << (PAGE_SHIFT-10),
                codesize >> 10,
                reservedpages << (PAGE_SHIFT-10),
index 0007b2a..774549a 100644 (file)
@@ -126,7 +126,7 @@ void __init mem_init(void)
 #endif
 
        printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n",
-              (unsigned long)nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               totalram_pages << (PAGE_SHIFT-10),
               codepages << (PAGE_SHIFT-10),
               datapages << (PAGE_SHIFT-10),
index f207f1a..1110784 100644 (file)
@@ -204,7 +204,7 @@ void __init mem_init(void)
        totalram_pages += free_all_bootmem();
 
        printk(KERN_INFO "Memory: %luk/%luk available\n",
-              (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               num_physpages << (PAGE_SHIFT-10));
 #ifdef CONFIG_MMU
        mem_init_done = 1;
index 38c79c5..1f4ee47 100644 (file)
@@ -417,7 +417,7 @@ void __init mem_init(void)
 
        printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
               "%ldk reserved, %ldk data, %ldk init, %ldk highmem)\n",
-              (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               ram << (PAGE_SHIFT-10),
               codesize >> 10,
               reservedpages << (PAGE_SHIFT-10),
index 8cee387..ec14205 100644 (file)
@@ -112,7 +112,7 @@ void __init mem_init(void)
               "Memory: %luk/%luk available"
               " (%dk kernel code, %dk reserved, %dk data, %dk init,"
               " %ldk highmem)\n",
-              (unsigned long) nr_free_pages() << (PAGE_SHIFT - 10),
+              nr_free_pages() << (PAGE_SHIFT - 10),
               max_mapnr << (PAGE_SHIFT - 10),
               codesize >> 10,
               reservedpages << (PAGE_SHIFT - 10),
index b0831d9..d5aca31 100644 (file)
@@ -506,7 +506,7 @@ void __init mem_init(void)
 #endif
 
        printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init)\n",
-               (unsigned long)nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                num_physpages << (PAGE_SHIFT-10),
                codesize >> 10,
                reservedpages << (PAGE_SHIFT-10),
index 579382c..0e5c59b 100644 (file)
@@ -372,7 +372,7 @@ void __init mem_init(void)
 
        printk(KERN_INFO "Memory: %luk/%luk available (%luk kernel code, "
               "%luk reserved, %luk data, %luk bss, %luk init)\n",
-               (unsigned long)nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                num_physpages << (PAGE_SHIFT-10),
                codesize >> 10,
                reservedpages << (PAGE_SHIFT-10),
index c634dfb..7656479 100644 (file)
@@ -105,7 +105,7 @@ void __init mem_init(void)
        datasize =  (unsigned long) &_edata - (unsigned long) &_etext;
        initsize =  (unsigned long) &__init_end - (unsigned long) &__init_begin;
         printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, %ldk data, %ldk init)\n",
-                (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                 max_mapnr << (PAGE_SHIFT-10),
                 codesize >> 10,
                 reservedpages << (PAGE_SHIFT-10),
index edc842f..fabb7c6 100644 (file)
@@ -232,7 +232,7 @@ void __init mem_init(void)
 
        printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
               "%dk data, %dk init)\n",
-               (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                num_physpages << (PAGE_SHIFT-10),
                codesize >> 10,
                datasize >> 10,
index 54114ad..dc7c3b1 100644 (file)
@@ -472,7 +472,7 @@ void __init mem_init(void)
                        reservedpages++;
 
        printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, %dk reserved, %dk data, %dk init, %ldk highmem)\n",
-              (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               num_physpages << (PAGE_SHIFT - 10),
               codepages << (PAGE_SHIFT-10),
               reservedpages << (PAGE_SHIFT - 10),
index 61d7e61..a5d5e70 100644 (file)
@@ -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
index 3cd7711..95e877f 100644 (file)
@@ -892,7 +892,7 @@ void __init mem_init(void)
 
        printk(KERN_INFO "Memory: %luk/%luk available (%dk kernel code, "
                        "%dk reserved, %dk data, %dk init, %ldk highmem)\n",
-               (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                num_physpages << (PAGE_SHIFT-10),
                codesize >> 10,
                reservedpages << (PAGE_SHIFT-10),
index ea56b8c..810bd31 100644 (file)
@@ -687,7 +687,7 @@ void __init mem_init(void)
 
        printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
                         "%ldk absent, %ldk reserved, %ldk data, %ldk init)\n",
-               (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+               nr_free_pages() << (PAGE_SHIFT-10),
                max_pfn << (PAGE_SHIFT-10),
                codesize >> 10,
                absent_pages << (PAGE_SHIFT-10),
index 427e14f..cdbc27c 100644 (file)
@@ -203,7 +203,7 @@ void __init mem_init(void)
 
        printk("Memory: %luk/%luk available (%ldk kernel code, %ldk reserved, "
               "%ldk data, %ldk init %ldk highmem)\n",
-              (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
+              nr_free_pages() << (PAGE_SHIFT-10),
               ram << (PAGE_SHIFT-10),
               codesize >> 10,
               reservedpages << (PAGE_SHIFT-10),