Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2291482imm; Thu, 7 Jun 2018 08:16:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIhOmXWN5VoNcyvfIfLvVkuoTHLEc7JN9BV265kzSyODB6o+ucTXGnb6kii+P1rVMNZ4mWH X-Received: by 2002:aa7:84cf:: with SMTP id x15-v6mr2173332pfn.220.1528384615496; Thu, 07 Jun 2018 08:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528384615; cv=none; d=google.com; s=arc-20160816; b=ZHre1tXGbKTaAqFMb1i60/GuMUg+ma/wroRBepIbhKrBvclJdWTIytgxnD1dgdatkG e08qvpiWYSodfg+nBdROCICfNwTf+DY5PrpLgeFE3REkm4xdu7fIE/c9W/L1nRu/rm8o 7DfGACS0FszGJE5e613cVmnaARViK/snliDS1KRmZx+6MAnidQ7g9VImTIbeDahwPcNJ 2ipIZIn3p1it/ulIM/cJXeNcP7ixJb0zyFeI9EFZUR741V7k+PmtRhWZWVsD5t8DHm3x 2l/uE23KBTICCSPJIRH49Rce361c8Er+a8+SAqQC7iCMc8YsXsOzf5muL73P6dnDMmlZ IDMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=M3PL+/QHvD4tX19LdQaBlmbRxwtZ3VGXujZnbT70CBU=; b=olkySrqmCQ+nBEdE4xZUV2s1iMIfR+wvBUdby2raCCB8Q1Jy+kkFgvAUsVY790alaz La6oRhrgv1NO8IMUcgXMztqw5rb1UAlHD0tkLYoNIkJUj+vMQvCXL+8p17OvEEfMx2QD HLxXWP0DOO7WRlB8FY3oBaCSHf0gJsUSZvfrss9JxETh1UeNKshfVh20KgSXlQCneOH4 xth3rwIlGbKiSnC/Ra/eLfEjc2FlAfqiRahRdAvUJzi1anVwoEU27uTXIbBYZJEJJPTz tLvUgUnzfJAXJ8/wda3BIHhwJ9YrZLSIqyA1H/UJLWW497DuiNZSVHQeFanh951VAiLO SG6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si54097247plz.364.2018.06.07.08.16.40; Thu, 07 Jun 2018 08:16:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934968AbeFGPBd (ORCPT + 99 others); Thu, 7 Jun 2018 11:01:33 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41388 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934809AbeFGPB2 (ORCPT ); Thu, 7 Jun 2018 11:01:28 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbv-0005hJ-CS; Thu, 07 Jun 2018 15:09:55 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvaz-0002lV-S4; Thu, 07 Jun 2018 15:08:57 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "linux-edac" , "David Daney" , linux-mips@linux-mips.org, "James Hogan" , "Borislav Petkov" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 067/410] EDAC, octeon: Fix an uninitialized variable warning In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: James Hogan 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. Signed-off-by: James Hogan Acked-by: David Daney Cc: linux-edac Cc: linux-mips@linux-mips.org Fixes: 1bc021e81565 ("EDAC: Octeon: Add error injection support") Link: http://lkml.kernel.org/r/20171113161206.20990-1-james.hogan@mips.com Signed-off-by: Borislav Petkov Signed-off-by: Ben Hutchings --- drivers/edac/octeon_edac-lmc.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/edac/octeon_edac-lmc.c +++ b/drivers/edac/octeon_edac-lmc.c @@ -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)