All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	trivial@kernel.org
Subject: Re: [PATCH][TRIVIAL] mm/frontswap: fix uninit'ed variable warning
Date: Tue, 31 Jul 2012 11:23:32 -0400	[thread overview]
Message-ID: <20120731152332.GL4789@phenom.dumpdata.com> (raw)
In-Reply-To: <1343677664-26665-1-git-send-email-sjenning@linux.vnet.ibm.com>

On Mon, Jul 30, 2012 at 02:47:44PM -0500, Seth Jennings wrote:
> Fixes uninitialized variable warning on 'type' in frontswap_shrink().
> type is set before use by __frontswap_unuse_pages() called by
> __frontswap_shrink() called by frontswap_shrink() before use by
> try_to_unuse().

OK, applied.
> 
> Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
> ---
> Based on next-20120730
> 
>  mm/frontswap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/frontswap.c b/mm/frontswap.c
> index 6b3e71a..89dc399 100644
> --- a/mm/frontswap.c
> +++ b/mm/frontswap.c
> @@ -292,7 +292,7 @@ static int __frontswap_shrink(unsigned long target_pages,
>  void frontswap_shrink(unsigned long target_pages)
>  {
>  	unsigned long pages_to_unuse = 0;
> -	int type, ret;
> +	int uninitialized_var(type), ret;
>  
>  	/*
>  	 * we don't want to hold swap_lock while doing a very
> -- 
> 1.7.9.5

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	trivial@kernel.org
Subject: Re: [PATCH][TRIVIAL] mm/frontswap: fix uninit'ed variable warning
Date: Tue, 31 Jul 2012 11:23:32 -0400	[thread overview]
Message-ID: <20120731152332.GL4789@phenom.dumpdata.com> (raw)
In-Reply-To: <1343677664-26665-1-git-send-email-sjenning@linux.vnet.ibm.com>

On Mon, Jul 30, 2012 at 02:47:44PM -0500, Seth Jennings wrote:
> Fixes uninitialized variable warning on 'type' in frontswap_shrink().
> type is set before use by __frontswap_unuse_pages() called by
> __frontswap_shrink() called by frontswap_shrink() before use by
> try_to_unuse().

OK, applied.
> 
> Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
> ---
> Based on next-20120730
> 
>  mm/frontswap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/frontswap.c b/mm/frontswap.c
> index 6b3e71a..89dc399 100644
> --- a/mm/frontswap.c
> +++ b/mm/frontswap.c
> @@ -292,7 +292,7 @@ static int __frontswap_shrink(unsigned long target_pages,
>  void frontswap_shrink(unsigned long target_pages)
>  {
>  	unsigned long pages_to_unuse = 0;
> -	int type, ret;
> +	int uninitialized_var(type), ret;
>  
>  	/*
>  	 * we don't want to hold swap_lock while doing a very
> -- 
> 1.7.9.5

  reply	other threads:[~2012-07-31 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 19:47 [PATCH][TRIVIAL] mm/frontswap: fix uninit'ed variable warning Seth Jennings
2012-07-30 19:47 ` Seth Jennings
2012-07-31 15:23 ` Konrad Rzeszutek Wilk [this message]
2012-07-31 15:23   ` Konrad Rzeszutek Wilk

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=20120731152332.GL4789@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sjenning@linux.vnet.ibm.com \
    --cc=trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.