All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting in previous email)
@ 2009-11-04  6:55 ` askb
  0 siblings, 0 replies; 14+ messages in thread
From: askb @ 2009-11-04  6:43 UTC (permalink / raw)
  To: linux-kernel, kernel-janitors

Found the compiler warning on linux-next: 	

mm/ksm.c: In function ‘ksm_scan_thread’:
mm/ksm.c:1083: warning: ‘page2[0u]’ may be used uninitialized in this
function
mm/ksm.c:1083: note: ‘page2[0u]’ was declared here

fix for the above warning:

Signed-off-by: Anil SB <askb23@gmail.com>

diff --git a/mm/ksm.c b/mm/ksm.c
index bef1af4..2ea0fd3 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1080,7 +1080,7 @@ static void stable_tree_append(struct rmap_item *rmap_item,
  */
 static void cmp_and_merge_page(struct page *page, struct rmap_item *rmap_item)
 {
-	struct page *page2[1];
+	struct page *page2[1] = {NULL};
 	struct rmap_item *tree_rmap_item;
 	unsigned int checksum;
 	int err;





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

end of thread, other threads:[~2009-11-09 15:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-04  6:43 [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting in previous email) askb
2009-11-04  6:55 ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting askb
2009-11-04  9:57 ` walter harms
2009-11-04  9:57   ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting in previous email) walter harms
2009-11-04 11:28   ` askb
2009-11-04 11:40     ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my askb
2009-11-09  8:16     ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting walter harms
2009-11-09  8:16       ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting in previous email) walter harms
2009-11-09 10:51     ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting Hugh Dickins
2009-11-09 10:51       ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting in previous email) Hugh Dickins
2009-11-09 13:45       ` askb
2009-11-09 13:57         ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my askb
2009-11-09 15:54         ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting Hugh Dickins
2009-11-09 15:54           ` [PATCH] mm/ksm.c - Fix compile warnings (PS ignore my formatting in previous email) Hugh Dickins

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.