Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp933921rdh; Fri, 24 Nov 2023 01:11:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHEtBoHS/16SV9zjOZkwMGmkXcS98anffcgBFLhn7WE8Ipd8dpdJg9jnhLzPjMycIUDMYs8 X-Received: by 2002:a05:6a21:1584:b0:18b:9db7:4db3 with SMTP id nr4-20020a056a21158400b0018b9db74db3mr2170954pzb.40.1700817081287; Fri, 24 Nov 2023 01:11:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817081; cv=none; d=google.com; s=arc-20160816; b=aIx6jkLv35gEIn8DISuXCY5vdTo8m8bBoSCW8cwYmzGsd5ZGpA8PP+iixFJnK/lslT jddmTGU91rx/WWTts4PAGEBzOFdu1qkrNqrBMB2ZrS7kIgwLiS7c6Tn3+ceAE/2WFVbI RE5Yisja0nrYn5/17fmCFq8+ae+Dcd8b6nm3VRy0/c6MGiA287fqjC9r7k+TXS/uoFHt kWNt3iyjtNG2bhEtegmao2zV3HQKbrn4Zs073gJOCD3TXi8Wki7Wz23mKJeHzt+Vl7UO xdvkFQB0U/gyxYv1gFa3t7LMwh/KmmrjEH30wyowqkg/rU+Fjyoz4JXm4HLH3hiG7PqG k6Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=25pCvjTnhvkrwekuoUKLKLjXX+d4cJp7gLeR8BL7tTM=; fh=lXxbNyO3mz8zt0Ai1Z+LtrTnuPNaP9sF2g9O9LBUvFY=; b=suNHBq0QssLABz7gaswJAseFlmoEkv8RRTG91nVYANF1rwbRPptUTHRWeTHJnESJI6 MGBDfY9VYnt6kmm//CCvgJWvMHjxoraVirNL9AOAwydae+KbFtukOsMETaHQ0/ZB+tRi MPjqo56bkHXE+7v3VKnElNnddvfKk5xPOIO1QPg4hhok6nihH4Tpo5k53hT7nBfwyNmK CHzP6OWrmG3kcvgAfRarAsDorYipDnbmy+HTkGEJqP9xDtxJTS03gemDP2y1f/FW0BC9 ET21Yuv6luyZkEaUo0n7OMJlfLpPaOaoo4gXD4x3b/cbTWJH5U91WLh0+q4r/99wGW5g tRvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CoTr3eZb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b6-20020a170902ed0600b001cf59df025csi2930919pld.459.2023.11.24.01.11.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:11:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CoTr3eZb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E1CAC80725FE; Fri, 24 Nov 2023 01:11:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230369AbjKXJLJ (ORCPT + 99 others); Fri, 24 Nov 2023 04:11:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbjKXJLI (ORCPT ); Fri, 24 Nov 2023 04:11:08 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1082C1BD; Fri, 24 Nov 2023 01:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700817075; x=1732353075; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UxqqJUYgDGy0V41HkWwj4VqlLP4xwU5p+Vk173/E2Ho=; b=CoTr3eZbZ+IHbwU8jKYiSpppSmFe+BVcqymxtRKZroKJ80OoG/+38qVq iebwgmsupYJbmp2Ak8xUlz34tIyZqlq4NCZ2K+4T9DfrmDoyVr0KiUE1O Ximfx6UELEqJ4QAGaHmwu86FrLowzfMjjSAimpojj/9o+RdL8oNq0+dnp rkZ4YeYFuP09XPQG6g/LBVyam+/Rj7M4L6OH1INGey/y9ntWCJUgBMHWg sykL8edNOq2CWY4JppyfCvfxjoAvM6cCNxoVGgo6NHbH7q/JA2vsM8+qC 73CiMG3Xs2alXtAJtw2puv1uXq8GqOhyXDKEJi+uK82TNPox5oGBQKCNY A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="5546722" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="5546722" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:10:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="1014854104" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="1014854104" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:10:01 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals Date: Fri, 24 Nov 2023 11:09:17 +0200 Message-Id: <20231124090919.23687-5-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com> References: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:11:20 -0800 (PST) Replace literal 0x7f with PCI_HEADER_TYPE_MASK. Signed-off-by: Ilpo Järvinen --- drivers/edac/edac_pci_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/edac_pci_sysfs.c b/drivers/edac/edac_pci_sysfs.c index 287cc51dbc86..901d4cd3ca38 100644 --- a/drivers/edac/edac_pci_sysfs.c +++ b/drivers/edac/edac_pci_sysfs.c @@ -521,7 +521,7 @@ static void edac_pci_dev_parity_clear(struct pci_dev *dev) /* read the device TYPE, looking for bridges */ pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type); - if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) + if ((header_type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) get_pci_parity_status(dev, 1); } @@ -583,7 +583,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev) edac_dbg(4, "PCI HEADER TYPE= 0x%02x %s\n", header_type, dev_name(&dev->dev)); - if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) { + if ((header_type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) { /* On bridges, need to examine secondary status register */ status = get_pci_parity_status(dev, 1); -- 2.30.2