From: Seth Jennings Date: Mon, 30 Jul 2012 19:47:44 +0000 (-0500) Subject: mm/frontswap: fix uninit'ed variable warning X-Git-Tag: v3.12-rc1~2259^2~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b982fcf0260b8371604fcf6a12c6beecb731c57;p=kernel%2Fkernel-generic.git mm/frontswap: fix uninit'ed variable warning 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 Signed-off-by: Konrad Rzeszutek Wilk --- 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