Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp996614yba; Thu, 4 Apr 2019 02:02:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyP5vCxBUExJTyc7gFt0nKMTVDWOXJm23IpeyXucsG0+7Pu4d2dL3sE08h1tmFwy5GGkWuj X-Received: by 2002:a17:902:3381:: with SMTP id b1mr5177888plc.5.1554368578923; Thu, 04 Apr 2019 02:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368578; cv=none; d=google.com; s=arc-20160816; b=Qqn0/RmtF5CQHB4rrFkpbWKXHPaiUyJrwuOF9Xi2YvQbG6TnJVCouvKPdvl4emMdEO jlowDNokr6K7OW6uOqGR4LAGu1onV5V0MB05ahDI1ORofH3dt+7uRw/nzcqnXEC+YH9a LXFQfHl0vgZotgxk3dV8J6sD+qyZCfYsilH+UFERKidlR2ZU26RrWxfkkCYEyNBaHpov R5bjVGCWNRtZgCS6o2aok+gumgfo7DcgOKVYBY/QAlGUAh/pd78kOrZ9YS2af0CBiHsx p2bkaAsdr0aZsDU5av21AyudfVuH4KX4uvSU6fZQkk2nk7s9L99ySyjQ5PvbjktfHrZj 0Pmw== 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=9c2O91iTIj6JDYac81jaL0yHUaYf66uzuLQexLA3wxM=; b=TK4/kpFHCkojckKB9sOmQIMBQw1MHgSRvBzbRVfFmCm4bheR0PUXw/dX1q9KHW1yxA c5hBn6cRd9RnzgtIX0RnEgGWdN/YaQCvc4rmwwS96gT+Y9assdvvRPortQBZrIWoZPka +FiyASIapHlfcUjvC3ZwPX+SSFjn0wPU3Ly0Iz2O32BQjvgCMSkvDThuIRafwU4K0ZUE neAULgEn0I5b96JNST36LEh7wJFH+7k43muNUvuTjJ3DzdmuD/bUH7mPx8G8IAEAgFIN pVSnLYwR+2+r/Go65B+CCjWCSZpmw8F+X7HDEf5yUccz9C2jOzCtfZdsm8SJVcWq2cjT uCYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=urTCobJz; 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 p22si16339821pgh.468.2019.04.04.02.02.43; Thu, 04 Apr 2019 02:02:58 -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=urTCobJz; 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 S1731565AbfDDJCI (ORCPT + 99 others); Thu, 4 Apr 2019 05:02:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:39448 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731554AbfDDJCH (ORCPT ); Thu, 4 Apr 2019 05:02:07 -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 E3A0921741; Thu, 4 Apr 2019 09:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368526; bh=h5j/gmtqTH8c167uJ9LEd0/hxb0p0cBoKLpoAIcS0KQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=urTCobJz3juKuNCjBJs/1M0WxriCTKayMxjZVFGtqUJLfLByaBVAgF4Vg0GeGHuyO VfzY1mjFmul7gWsyzvpZtpax1axTx7Wg1MVG3vajJkCjLfdpOFEWRKPvSmMLxe+pFi k+3itPuxBpnK8w+vZiHDAg0TR6hEiBlCeAeR7zRc= 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.19 056/187] powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc Date: Thu, 4 Apr 2019 10:46:33 +0200 Message-Id: <20190404084605.721205373@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@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.19-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 9deea5ee13f6..27f1e6415036 100644 --- a/arch/powerpc/xmon/ppc-dis.c +++ b/arch/powerpc/xmon/ppc-dis.c @@ -158,7 +158,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