linux-mips
[Top] [All Lists]

[PATCH] mips: mm: tlbex.c: Fix compiler warnings

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] mips: mm: tlbex.c: Fix compiler warnings
From: "Maxin B. John" <maxin.john@gmail.com>
Date: Fri, 9 Sep 2011 01:06:00 +0300
Cc: David Daney <david.daney@cavium.com>, Lucas De Marchi <lucas.demarchi@profusion.mobi>, Kevin Cernekee <cernekee@gmail.com>, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=0QL0/FnMtUiP/KIYyDDz4eZI3sxW0zd4hj32cWZugqs=; b=oceT+Z7JMHfbJSj6E1YNmzSlx4mOcaxRxrJZHLenVuT4N9au73NzbTCbMFIzs9wL42 TQ4OQLi/1NswedLYHdCqZAUc73XZrZGP0adOrD13gOe4ApdnFEmiNHJ2hiGmBeHlzC7e KnoBhP/J2N9mC2JgwiPwet/8QW+iEkIstFE4M=
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.20 (2009-06-14)
 CC      arch/mips/mm/tlbex.o
cc1: warnings being treated as errors
arch/mips/mm/tlbex.c: In function 'build_r3000_tlb_modify_handler':
arch/mips/mm/tlbex.c:1769: error: 'wr.r1' is used uninitialized in this function
arch/mips/mm/tlbex.c:1769: error: 'wr.r2' is used uninitialized in this function
arch/mips/mm/tlbex.c:1769: error: 'wr.r3' is used uninitialized in this function
make[2]: *** [arch/mips/mm/tlbex.o] Error 1
make[1]: *** [arch/mips/mm] Error 2
make: *** [arch/mips] Error 2

Signed-off-by: Maxin B. John <maxin.john@gmail.com>
---
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index b6e1cff..ab51b83 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -1764,6 +1764,7 @@ static void __cpuinit build_r3000_tlb_modify_handler(void)
        memset(handle_tlbm, 0, sizeof(handle_tlbm));
        memset(labels, 0, sizeof(labels));
        memset(relocs, 0, sizeof(relocs));
+       memset(&wr, 0, sizeof(wr));
 
        build_r3000_tlbchange_handler_head(&p, K0, K1);
        build_pte_modifiable(&p, &r, wr.r1, wr.r2,  wr.r3, label_nopage_tlbm);

<Prev in Thread] Current Thread [Next in Thread>