public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][TRIVIAL] mm/frontswap: fix uninit'ed variable warning
@ 2012-07-30 19:47 Seth Jennings
  2012-07-31 15:23 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 2+ messages in thread
From: Seth Jennings @ 2012-07-30 19:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Seth Jennings, Konrad Rzeszutek Wilk, linux-kernel, linux-mm,
	trivial

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().

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-31 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-30 19:47 [PATCH][TRIVIAL] mm/frontswap: fix uninit'ed variable warning Seth Jennings
2012-07-31 15:23 ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox