Skip to contentSkip to conversation

Patch "EDAC, octeon: Fix an uninitialized variable warning" has been added to the 4.4-stable tree

PATCH Greg Kroah-Hartman 1 participant 1 message Feb 15, 2018

Subsystems (3)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

EDAC, octeon: Fix an uninitialized variable warning

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
edac-octeon-fix-an-uninitialized-variable-warning.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From 544e92581a2ac44607d7cc602c6b54d18656f56d Mon Sep 17 00:00:00 2001
From: James Hogan <[email protected]>
Date: Mon, 13 Nov 2017 16:12:06 +0000
Subject: EDAC, octeon: Fix an uninitialized variable warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: James Hogan <[email protected]>

commit 544e92581a2ac44607d7cc602c6b54d18656f56d upstream.

Fix an uninitialized variable warning in the Octeon EDAC driver, as seen in MIPS cavium_octeon_defconfig builds since v4.14 with Codescape GNU Tools 2016.05-03:

drivers/edac/octeon_edac-lmc.c In function ‘octeon_lmc_edac_poll_o2’:

  drivers/edac/octeon_edac-lmc.c:87:24: warning: ‘((long unsigned int*)&int_reg)[1]’ may \
    be used uninitialized in this function [-Wmaybe-uninitialized]
    if (int_reg.s.sec_err || int_reg.s.ded_err) {
                        ^

Iinitialise the whole int_reg variable to zero before the conditional assignments in the error injection case.

---
 drivers/edac/octeon_edac-lmc.c |    1 +
 1 file changed, 1 insertion(+)

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/edac-octeon-fix-an-uninitialized-variable-warning.patch --
To unsubscribe from this list: send the line "unsubscribe linux-edac" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

drivers/edac/octeon_edac-lmc.c +1 -0
@@ -79,6 +79,7 @@ static void octeon_lmc_edac_poll_o2(stru
 	if (!pvt->inject)
 		int_reg.u64 = cvmx_read_csr(CVMX_LMCX_INT(mci->mc_idx));
 	else {
+		int_reg.u64 = 0;
 		if (pvt->error_type == 1)
 			int_reg.s.sec_err = 1;
 		if (pvt->error_type == 2)