linux-mips
[Top] [All Lists]

[PATCH] mpis: cavium-octeon/executive/cvmx-l2c.c: fix uninitialized vari

To: Ralf Baechle <ralf@linux-mips.org>, Jim Quinlan <jim2101024@gmail.com>, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mpis: cavium-octeon/executive/cvmx-l2c.c: fix uninitialized variable
From: Cong Ding <dinggnu@gmail.com>
Date: Mon, 14 Jan 2013 22:47:03 +0100
Cc: Cong Ding <dinggnu@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=EJMR/91ORBZazX8OjfrrvuqX3NT52WjsgmoDCdzCH4c=; b=Nt2Z8vNj8j6mPU4cvK12w+/l1pNH5h00aKqVqWDxTcjoFZSIwTREYjgKahS2zOKD1Y RIZAfy6c/e/vJR6VimqujbMdgqbvrmE2uiGaSOliPeUWN0CndQtk1529YdBeyjf4nwd1 G+AHVow7mxsqQHE3oYbs+yVNyJ9uDUWjyBSHp8R++1MZnS8sfd+XmgGC9wZJ5kbtSj18 G6TmwaDqRkDBGCsu+m6fnCCMJhW+eXKqLmJgYBdKnIr/wDbrystQtB03eLs+X76yqKJA K8t1nkKCBpbNWskY90x5CQU4ABmF3FgigI3G8nnqvTQ/TgzjGM0jGtKkSsvE3l9lXJnz UaTQ==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Sender: linux-mips-bounce@linux-mips.org
the variable dummy is used without initialization.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
---
 arch/mips/cavium-octeon/executive/cvmx-l2c.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-l2c.c 
b/arch/mips/cavium-octeon/executive/cvmx-l2c.c
index 9f883bf..d7e07af 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-l2c.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-l2c.c
@@ -286,7 +286,7 @@ uint64_t cvmx_l2c_read_perf(uint32_t counter)
 static void fault_in(uint64_t addr, int len)
 {
        volatile char *ptr;
-       volatile char dummy;
+       volatile char dummy = 0;
        /*
         * Adjust addr and length so we get all cache lines even for
         * small ranges spanning two cache lines.
-- 
1.7.9.5


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