lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090803172256.GA26766@elte.hu>
Date:	Mon, 3 Aug 2009 19:22:56 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
Cc:	Christoph Lameter <cl@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-arch@...r.kernel.org,
	Linux Kernel Development <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Drop superfluous casts in nr_free_pages() callers


* Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.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@...e.hu>

Thanks Geert,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ