From patchwork Tue Feb 14 09:55:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 56814 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2873803wrn; Tue, 14 Feb 2023 01:58:01 -0800 (PST) X-Google-Smtp-Source: AK7set+iPhDETomCSMQgWArX2h+onzbqzjx3is69h2lIRHPQ4fIFCBQn926d8WOdKRX/WSxDcsnT X-Received: by 2002:a50:d694:0:b0:4ac:b858:37b1 with SMTP id r20-20020a50d694000000b004acb85837b1mr1908766edi.7.1676368681220; Tue, 14 Feb 2023 01:58:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676368681; cv=none; d=google.com; s=arc-20160816; b=0t8nUW59yxG1U8M6YJSOhp+s4wRuCHpBaIfD9Ees1+Z4vJC8nnxjkeTdx6y3GCFeDO 7xORyxjLTVEkVNGiyR/n59ctIVvNl9az0GtiIIcJXeOSAy0/XIpEoHpbezx1F7YodQPz 2zrYxDL3nTnoiY6TqbSAmJ7QQgxFXNmRKyULRtp+2IWQp65KW96My8FazlY+hpGo4d0E JDIrpSf/N/iLuuTj9jWK1hD9RlZoufrWsfsO7qkqXaon74rpok8wrhwa4XAfXGCPXZoA b0Qm/Y9tjf5YyzrYnWWskhuM4LiC1pg9UK2amclA2B4pQcsoi7IOZGv4ODnmjmazsKQ9 Qhmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7bGRbUp7nNCsFOKn55St1JRiQ7BHq/0aoTgf8q6Qdcg=; b=w7TPqPOGnhE1Fvjt+e/niPtN70p4CGZc7Gr+N9LkDP5K4h/OGTVmF4LJDlXgM23Vvc LjeSrZ4/A7m4tFU+eDU12+abYbKBWPvFnM7WnodX4BBPW9S/EvhvhUXjn992c0XOf89t 2MeytYa4Ow2H3pT4bAU4Xux/UD4uMDhEEjVNjkgqixwkY9pZLen/U4+E3F81u4C/mtPM Y7oioCuYddqNmYBIz7RLyKGRG6oihjBBxfEj9RRA/m4btZ0pvJNUEgJ0W7oMdiTOYELW ROAPjJT9nCu8Qcp1VdE0XWqW4z4617GgZwZyKHXl3Q5jFdnkKlGN0Y2RM0/rjrmZQ4cl 7p+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=brj3WGeQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020aa7d711000000b004accbc7602bsi5368612edq.235.2023.02.14.01.57.38; Tue, 14 Feb 2023 01:58:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=brj3WGeQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232568AbjBNJ4x (ORCPT + 99 others); Tue, 14 Feb 2023 04:56:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232212AbjBNJ4N (ORCPT ); Tue, 14 Feb 2023 04:56:13 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA57C24CBC; Tue, 14 Feb 2023 01:55:56 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 41AAC1EC08BF; Tue, 14 Feb 2023 10:55:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1676368555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=7bGRbUp7nNCsFOKn55St1JRiQ7BHq/0aoTgf8q6Qdcg=; b=brj3WGeQt/qR1+3ctwqUSDvLiiFOcRdh+U2yuK+3YmtuOFLRxo6Zp9gHCyWYc1dEbWf930 fGU/A1tLO0rcqglT/GSCKj9KDA1pCuIzLd9dL30vt5PAjSJz1kPzNOhIgnUoj3t3tQfkGp fZkI0WvJQQvMIBqWGCW4023Od/cwuuA= Date: Tue, 14 Feb 2023 10:55:51 +0100 From: Borislav Petkov To: Nathan Chancellor Cc: Yazen Ghannam , Tom Rix , tony.luck@intel.com, james.morse@arm.com, mchehab@kernel.org, rric@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] EDAC/amd64: Shut up an -Werror,-Wsometimes-uninitialized clang false positive Message-ID: References: <20230213191510.2237360-1-trix@redhat.com> <03b91ce8-c6d0-63e7-561c-8cada0ece2fe@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757799966399850205?= X-GMAIL-MSGID: =?utf-8?q?1757799966399850205?= From: Yazen Ghannam Yeah, the code's fine even without this. What this is fixing is a compiler which is overeager to report false positives which then get automatically enabled in -Wall builds and when CONFIG_WERROR is set in allmodconfig builds, the build fails. It doesn't happen with gcc. Maybe clang should be more conservative when enabling such warnings under -Wall as, apparently, this has an impact beyond just noisy output. [ bp: Write a commit message. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/Y%2BqdVHidnrrKvxiD@dev-arch.thelio-3990X --- drivers/edac/amd64_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 1c4bef1cdf28..5b42533f306a 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -3928,7 +3928,7 @@ static const struct attribute_group *amd64_edac_attr_groups[] = { static int hw_info_get(struct amd64_pvt *pvt) { - u16 pci_id1, pci_id2; + u16 pci_id1 = 0, pci_id2 = 0; int ret; if (pvt->fam >= 0x17) {