From patchwork Fri Nov 24 09:09:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 169322 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1022629vqx; Fri, 24 Nov 2023 01:11:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfnAxabBWbi7FcGDW97nEPSTV3aiQWcDZG4qs2Vg113mOmWoUhFwtDAegA7GYZQJSsd9Sp X-Received: by 2002:a17:902:da8b:b0:1cf:9ffa:db03 with SMTP id j11-20020a170902da8b00b001cf9ffadb03mr2118979plx.26.1700817080276; Fri, 24 Nov 2023 01:11:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817080; cv=none; d=google.com; s=arc-20160816; b=jAD9qxSoiFm38PpDM7KYPf7kj+GshOY0LbTazC667lZ7aqjIIeXfv59d7y1mPVYmBK EFf8T7oTW6R0Ba0I4ZUHlvBHx5dIjsavlUCaoT1sEfIe1JEWlZx2icvMGU94bMF243hB vValiqzsDQYEO0eOOpfzhs6nSXl1UrMsITbJtWL/ZU92yo0ePZVkaTBX7qQwYIUWVtDU LapA7pLzRj/ARS3UbHJJ7FvJUpCZwLtc4D7Kr0Dda8+L6CNOc5YyNORdqG40dudvJpP2 tnlkgiTJlgdOVcEZFJdXtM/ckgiTUSgZZ/XED4yqtGfwKpVZoFPPW1YNrcay2uLNsyC0 4Ucg== 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 Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l12-20020a170903244c00b001cfa577f85dsi287000pls.360.2023.11.24.01.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:11:20 -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 4867982691A9; 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_J=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_J=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 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:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783435970492001826 X-GMAIL-MSGID: 1783435970492001826 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);