public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Christoph Lameter <cl@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-arch@vger.kernel.org,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Drop superfluous casts in nr_free_pages() callers
Date: Mon, 3 Aug 2009 19:22:56 +0200	[thread overview]
Message-ID: <20090803172256.GA26766@elte.hu> (raw)
In-Reply-To: <alpine.LRH.2.00.0908031808440.11620@vixen.sonytel.be>


* Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> 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.

> diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
> index 3cd7711..95e877f 100644
> --- a/arch/x86/mm/init_32.c
> +++ b/arch/x86/mm/init_32.c
> @@ -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),
> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
> index 6176fe8..44f82a6 100644
> --- a/arch/x86/mm/init_64.c
> +++ b/arch/x86/mm/init_64.c
> @@ -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),

Acked-by: Ingo Molnar <mingo@elte.hu>

Thanks Geert,

	Ingo

  parent reply	other threads:[~2009-08-03 17:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 16:11 [PATCH] Drop superfluous casts in nr_free_pages() callers Geert Uytterhoeven
2009-08-03 16:11 ` Geert Uytterhoeven
2009-08-03 16:48 ` Christoph Lameter
2009-08-03 17:22 ` Ingo Molnar [this message]
2009-08-03 17:22   ` Ingo Molnar
2009-08-03 17:24 ` Russell King
2009-08-03 19:02 ` David Miller
2009-08-04  2:55 ` Kyle McMartin
2009-08-04  3:16 ` Amerigo Wang
2009-08-08 22:41 ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090803172256.GA26766@elte.hu \
    --to=mingo@elte.hu \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox