From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jiang Liu <jiang.liu@huawei.com>,
David Rientjes <rientjes@google.com>,
Wen Congyang <wency@cn.fujitsu.com>, Mel Gorman <mgorman@suse.de>,
Minchan Kim <minchan@kernel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Michal Hocko <mhocko@suse.cz>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
David Howells <dhowells@redhat.com>,
Mark Salter <msalter@redhat.com>,
Jianguo Wu <wujianguo@huawei.com>,
linux-mm@kvack.org, linux-arch@vger.kernel.org,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@uclinux.org>,
Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>,
linux-m68k@lists.linux-m68k.org
Subject: Re: [PATCH, v2 13/13] mm/m68k: fix build warning of unused variable
Date: Wed, 29 May 2013 21:43:45 +0400 [thread overview]
Message-ID: <51A63E51.2060202@cogentembedded.com> (raw)
In-Reply-To: <1369838692-26860-14-git-send-email-jiang.liu@huawei.com>
Hello.
On 05/29/2013 06:44 PM, Jiang Liu wrote:
> Fix build warning of unused variable:
> arch/m68k/mm/init.c: In function 'mem_init':
> arch/m68k/mm/init.c:151:6: warning: unused variable 'i' [-Wunused-variable]
>
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Greg Ungerer <gerg@uclinux.org>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> Cc: linux-m68k@lists.linux-m68k.org
> Cc: linux-kernel@vger.kernel.org
> ---
> arch/m68k/mm/init.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
> index 6e0a938..6b4baa6 100644
> --- a/arch/m68k/mm/init.c
> +++ b/arch/m68k/mm/init.c
> @@ -146,14 +146,11 @@ void __init print_memmap(void)
> MLK_ROUNDUP(__bss_start, __bss_stop));
> }
>
> -void __init mem_init(void)
> +static inline void init_pointer_tables(void)
> {
> +#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
#ifdef's in the function bodies are frowned upon, this should better be:
#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
static inline void init_pointer_tables(void)
{
[...]
}
#else
static inline void init_pointer_tables(void) {}
#endif
> int i;
>
> - /* this will put all memory onto the freelists */
> - free_all_bootmem();
> -
> -#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
> /* insert pointer tables allocated so far into the tablelist */
> init_pointer_table((unsigned long)kernel_pg_dir);
> for (i = 0; i < PTRS_PER_PGD; i++) {
> @@ -165,7 +162,13 @@ void __init mem_init(void)
> if (zero_pgtable)
> init_pointer_table((unsigned long)zero_pgtable);
> #endif
> +}
>
> +void __init mem_init(void)
> +{
> + /* this will put all memory onto the freelists */
> + free_all_bootmem();
> + init_pointer_tables();
> mem_init_print_info(NULL);
> print_memmap();
> }
WBR, Sergei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2013-05-29 17:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 14:44 [PATCH, v2 00/13] kill free_all_bootmem_node() for all architectures Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 01/13] mm: introduce helper function set_max_mapnr() Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 02/13] mm/AVR32: prepare for killing free_all_bootmem_node() Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 03/13] mm/IA64: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 04/13] mm/m32r: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 05/13] mm/m68k: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 06/13] mm/metag: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 07/13] mm/MIPS: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 08/13] mm/PARISC: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 09/13] mm/PPC: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 10/13] mm/SH: " Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 11/13] mm: kill free_all_bootmem_node() Jiang Liu
2013-05-30 7:02 ` Tejun Heo
2013-05-29 14:44 ` [PATCH, v2 12/13] mm/alpha: unify mem_init() for both UMA and NUMA architectures Jiang Liu
2013-05-29 14:44 ` [PATCH, v2 13/13] mm/m68k: fix build warning of unused variable Jiang Liu
2013-05-29 17:43 ` Sergei Shtylyov [this message]
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=51A63E51.2060202@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=cascardo@holoscopio.com \
--cc=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=gerg@uclinux.org \
--cc=jiang.liu@huawei.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mm@kvack.org \
--cc=liuj97@gmail.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=minchan@kernel.org \
--cc=msalter@redhat.com \
--cc=rientjes@google.com \
--cc=wency@cn.fujitsu.com \
--cc=wujianguo@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).