From nobody Sun Feb 8 20:58:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1666265902; cv=none; d=zohomail.com; s=zohoarc; b=ZMjBmfuUmoqjPLq24FsbHLBqcTdWpCcyY6756e5IdAS43jmRucv2pbBSX26oB2/viunqhwO3FY0bKJ9PdT/qmhSQ9EstvAi4b8sQnQEB9A++pFqF6jWyFGvemkbZ8KrUKUr8sSN+1Aqt+KmG3lCnJ9W1eVfxr3ZYrbBYtu4DesI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666265902; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=bOeIQs06Ph1bJ91eHAC9fBVgauw5j59B8/KvO9VWdAY=; b=hH1bdeJWsLJnuFFhJXd0+Sn53SYqWlY9QWGqbrKetG9X9meHOvMyTw/1KzkVuIF6T7cYetqmW7YRH/J1TlAPLNE+5XxfFQYdtFE4VeBzzUWnL9KkDEOX8NjS8dL8RncS1LF1cYCLiwPniRnAeoJ8Xi3fR0WCQvkPD9/VLTF7/HY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1666265902635145.91504772109374; Thu, 20 Oct 2022 04:38:22 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.426637.675210 (Exim 4.92) (envelope-from ) id 1olTsC-0005ko-US; Thu, 20 Oct 2022 11:38:04 +0000 Received: by outflank-mailman (output) from mailman id 426637.675210; Thu, 20 Oct 2022 11:38:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1olTsC-0005kh-RN; Thu, 20 Oct 2022 11:38:04 +0000 Received: by outflank-mailman (input) for mailman id 426637; Thu, 20 Oct 2022 11:38:02 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1olTsA-0005kU-Lb for xen-devel@lists.xenproject.org; Thu, 20 Oct 2022 11:38:02 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a302b5b3-506b-11ed-8fd0-01056ac49cbb; Thu, 20 Oct 2022 13:37:54 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 92DE21FCFA; Thu, 20 Oct 2022 11:38:01 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4090D13494; Thu, 20 Oct 2022 11:38:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id REBlDhkzUWPEBgAAMHmgww (envelope-from ); Thu, 20 Oct 2022 11:38:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a302b5b3-506b-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1666265881; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=bOeIQs06Ph1bJ91eHAC9fBVgauw5j59B8/KvO9VWdAY=; b=PBpvCe+eKaNf8bwyjdesNestAeyQ6jmQl9dMvpuhLdQXjqPFo9p9VBZgDru/8YYuiEsJmQ M0a4vZAgkjF5JxMl8e5xw+lL3Gdm19fY3NtK8sbry4qXU0+EZFADAIQWui+2pHnFqOrQMh DHvIn+IF35Oa8nHjrGVNSMG5sLUEBEI= From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , xen-devel@lists.xenproject.org, Dan Carpenter Subject: [PATCH] x86/xen: silence smatch warning in pmu_msr_chk_emulated() Date: Thu, 20 Oct 2022 13:37:59 +0200 Message-Id: <20221020113759.17402-1-jgross@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1666265903259100001 Content-Type: text/plain; charset="utf-8" Commit 8714f7bcd3c2 ("xen/pv: add fault recovery control to pmu msr accesses") introduced code resulting in a warning issued by the smatch static checker, claiming to use an uninitialized variable. This is a false positive, but work around the warning nevertheless. Fixes: 8714f7bcd3c2 ("xen/pv: add fault recovery control to pmu msr accesse= s") Reported-by: Dan Carpenter Signed-off-by: Juergen Gross --- arch/x86/xen/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/pmu.c index 68aff1382872..898a252ed6f1 100644 --- a/arch/x86/xen/pmu.c +++ b/arch/x86/xen/pmu.c @@ -302,7 +302,7 @@ static bool xen_amd_pmu_emulate(unsigned int msr, u64 *= val, bool is_read) static bool pmu_msr_chk_emulated(unsigned int msr, uint64_t *val, bool is_= read, bool *emul) { - int type, index; + int type =3D 0, index =3D 0; =20 if (is_amd_pmu_msr(msr)) *emul =3D xen_amd_pmu_emulate(msr, val, is_read); --=20 2.35.3