]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/frontswap: fix uninit'ed variable warning
authorSeth Jennings <sjenning@linux.vnet.ibm.com>
Mon, 30 Jul 2012 19:47:44 +0000 (14:47 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 13 Aug 2012 19:41:30 +0000 (15:41 -0400)
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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
mm/frontswap.c

index 6b3e71a2cd483a70c845d33136719c43739a6c68..89dc399d332880d3458aaff9878a351db76b8c97 100644 (file)
@@ -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