Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp992236yba; Thu, 4 Apr 2019 01:57:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyD6pCpVPsJncCb2Ji7BC5dihPBeH4gc4XunRSWmjo+6k0XAMhqiEOjGa2j4ZWLCa9NeUjC X-Received: by 2002:a63:3190:: with SMTP id x138mr4465719pgx.273.1554368226986; Thu, 04 Apr 2019 01:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368226; cv=none; d=google.com; s=arc-20160816; b=t4dsPFqvYp+BHf0/LwK9IplP+CptYMd/g1cZcVtPb2ici3HRURhf2n1sZnD/fsp4mZ U1Ra9ctQ+YcI2X/ZtdIb6zi8amELyF355/jtM8eZNydok6eKZMwWPmfc8cUhBgTirbC+ WayRT/tgqsrdKzTfOaYahV9p8vutgl2HmP07vDA0kPld71vF03NxmQ0kMBbhWe0AqvuA HLjMRBTsjTmooVrb7I568iIsGT0DK7u2doUrJFiQAbvm1MKsVsAoQmHMpmMGgNpJvH2s ob5hhzLbz3taca/+TuafzXqkU0g1OVcxoiZcVU4KKNJDXZ86lyK69kmsAI/e454yJB06 77GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HLZEW/mDzosuQPSf2V0l/N0beofB38hrgvQcshBBZ2g=; b=p/q7zN76TK/eJfwF/iT1vDgaMMLc/WxuXs20MxmLP011LLbgRywUlx0a/+f4Gl0YBf rtqIqmfLPf5heAls4qned0Uba2E7hI2z5CE+4nK5ph8b9qYs3OZwM8I/rdeYclUqiIVP qOcaXUOr/wOXtCfnMLm6oejLK4FEyPzSgyRD/TqupDJ70dubwtKaGjOM65LQT9DcyP6y F2zQuPcibXKUHlfXxqK6v/yPFRj/GmdCEbnq5/E5yn+4bsZFX72rkNcX9Hs9V1PXk6/5 aLgm63KOsGZy1vlvsBe0gkbMVthb0COeV8P1FD5hx4d5Mec7rqvlVVOAW9uCK4+jwy2L cGuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BimYBiOt; 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 k126si15790991pgk.109.2019.04.04.01.56.51; Thu, 04 Apr 2019 01:57:06 -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; dkim=pass header.i=@kernel.org header.s=default header.b=BimYBiOt; 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 S1730338AbfDDIzk (ORCPT + 99 others); Thu, 4 Apr 2019 04:55:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:58632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729581AbfDDIzh (ORCPT ); Thu, 4 Apr 2019 04:55:37 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D5924217D4; Thu, 4 Apr 2019 08:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368136; bh=b0eRE5tpknAVu3qdxUs/ygHuZEs4Y+7wFw3QR8x+xtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BimYBiOtqWSGKNdLGcVvFcoS0QqAQsAlkR6DqhZ+1VJ/jeqFN+THrt1vi3KzF+B1v e+9NSTi9Wa4sUw/eXQA6Fovpk4O/vseWILGz1g6SeGcTSr4GkOTFQ1RM1f4a0H6ZN8 aFYVO1VkT/WgqydsDnxAdvcch7NFMTB/+um1nnQg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 042/121] powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc Date: Thu, 4 Apr 2019 10:47:10 +0200 Message-Id: <20190404084547.565458376@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084545.245659903@linuxfoundation.org> References: <20190404084545.245659903@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit e7140639b1de65bba435a6bd772d134901141f86 ] When building with -Wsometimes-uninitialized, Clang warns: arch/powerpc/xmon/ppc-dis.c:157:7: warning: variable 'opcode' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (cpu_has_feature(CPU_FTRS_POWER9)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/xmon/ppc-dis.c:167:7: note: uninitialized use occurs here if (opcode == NULL) ^~~~~~ arch/powerpc/xmon/ppc-dis.c:157:3: note: remove the 'if' if its condition is always true if (cpu_has_feature(CPU_FTRS_POWER9)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/xmon/ppc-dis.c:132:38: note: initialize the variable 'opcode' to silence this warning const struct powerpc_opcode *opcode; ^ = NULL 1 warning generated. This warning seems to make no sense on the surface because opcode is set to NULL right below this statement. However, there is a comma instead of semicolon to end the dialect assignment, meaning that the opcode assignment only happens in the if statement. Properly terminate that line so that Clang no longer warns. Fixes: 5b102782c7f4 ("powerpc/xmon: Enable disassembly files (compilation changes)") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/xmon/ppc-dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/xmon/ppc-dis.c b/arch/powerpc/xmon/ppc-dis.c index 31db8c072acd..006c7f864f65 100644 --- a/arch/powerpc/xmon/ppc-dis.c +++ b/arch/powerpc/xmon/ppc-dis.c @@ -162,7 +162,7 @@ int print_insn_powerpc (unsigned long insn, unsigned long memaddr) dialect |= (PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9 | PPC_OPCODE_HTM | PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2 - | PPC_OPCODE_VSX | PPC_OPCODE_VSX3), + | PPC_OPCODE_VSX | PPC_OPCODE_VSX3); /* Get the major opcode of the insn. */ opcode = NULL; -- 2.19.1