From patchwork Fri Nov 24 09:09:13 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: 169317 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1021958vqx; Fri, 24 Nov 2023 01:10:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmjMorMFILJFbgPBVn1iyTyHlDFFKCLhZi3MPcFy7Jjlh0nCkKB2Vxm+G5s85uufFdnB5I X-Received: by 2002:a17:90a:ce81:b0:281:3a5:d2ec with SMTP id g1-20020a17090ace8100b0028103a5d2ecmr7877298pju.8.1700817005238; Fri, 24 Nov 2023 01:10:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817005; cv=none; d=google.com; s=arc-20160816; b=zFP1CqpAcPT37GRr/pj1j4eJY0LPBd/T1sbmQoVzYqA+UlPAcV9KwyxmnNoBU6q4Xx UNXH+V5uEZzGYlSSRFrUivPylypZp0OHd9aqb/a7zzBi9KWgOzeLW4Vkf/LlFnsi8d4C kbzBpQHXV2LuFA6RD+HAJtAVLG+gBeD4yJAyTReCGN3PLve3fKHJJXwZWBrqPlS0PgXF OSLbkJbPehFu7AQz6xIdmVUdgm2LKvDMg6sC6AqZF6mnv3q34+7+iFhq3WQnV1JpgbO4 QlTW8Zz5UjRVxAkp/7GvJBLYIIIRyVbA4iDCHCDG9TGqpCzaKkHRLqPg3/jmYtXlDARZ Yc/A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=hz/2myqVrdOC+0UwOitd1dKxjWdm0cU1EYlqpNpp+Hs=; fh=ByMNP9v8oTTQ9D3oENe8ie3upH8RbF0rG5JWAC8tKgw=; b=ZWSFSNYz2+ERwrTglHcLva9h4H2IIZ4QZr0VYH5G4BYm+9oSXNWAZq5CDd6xMoJlgB pqFe7RGDyu5VQjbm7zJIFs8i18EVB7R7ZdNfbJchJ3C025Q4OYVamTR6EKC5xCx4L8Ta PNVa5IPj/i7IAoNotYMMbmmgRZ815Q4Y4JfeYBXLQ54TocopzjD0YdQv/SMNlJ1X6kSZ fZDCvBFyrli5WYVRXq+oGaBFoQzTLiPHZOuWbC636YRJfH04EcEmh5se/XabjCynxhFu 77OkkYmN5nEnKPIfkNBFri5BEqIY6228tbck3cDKhDORcVeDRsAW9W6782J0uTKNxXVo 8OBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h2T48vt+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id y6-20020a17090a474600b0028516fe2bffsi3644176pjg.186.2023.11.24.01.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:10:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h2T48vt+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id E372580A1376; Fri, 24 Nov 2023 01:09:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232479AbjKXJJo (ORCPT + 99 others); Fri, 24 Nov 2023 04:09:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbjKXJJm (ORCPT ); Fri, 24 Nov 2023 04:09:42 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 834F7D5E; Fri, 24 Nov 2023 01:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700816989; x=1732352989; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JaTQ4JHa+dyVoXq+fCw9FkUT+lKnnmSMerIyEl8VRYc=; b=h2T48vt++CnaXEMlHgAJfLxPTpu+NrD9RSLgC88/jbZAM4cpH8rmJSql zK4A/6vPGcqervibKkhUNb7OXuf0iu2MAUtjX1GKIRoeMghOJThV/iK9s KdJVN4x13UOefTr5f1P/hCLRIfnes2ZCuFLhfzoeG+F04h2Uv0KZFKd1J 7Uv4SXI8Ly7z4tiLgqyAXAGlBZRXQDCYdZprNs4GvN3uJpkYDSJQTCKq/ ESNv8X71SxODjAFir04Fpd9qhgTfXaNX+C4UD0w4+Pqh7wOiAYPVj3Wum Co1399ZD3MgF6EyHLffRxOlMcEq+iAYPHNVbOuSDZRI4mfoQplYGD6SsF Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="11066380" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="11066380" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="885220541" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="885220541" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:27 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Date: Fri, 24 Nov 2023 11:09:13 +0200 Message-Id: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:09:53 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783435892079469021 X-GMAIL-MSGID: 1783435892079469021 Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines. Signed-off-by: Ilpo Järvinen --- arch/x86/kernel/aperture_64.c | 3 +-- arch/x86/kernel/early-quirks.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 4feaa670d578..89c0c8a3fc7e 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c @@ -259,10 +259,9 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp) order); } - /* No multi-function device? */ type = read_pci_config_byte(bus, slot, func, PCI_HEADER_TYPE); - if (!(type & 0x80)) + if (!(type & PCI_HEADER_TYPE_MFD)) break; } } diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index a6c1867fc7aa..59f4aefc6bc1 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c @@ -779,13 +779,13 @@ static int __init check_dev_quirk(int num, int slot, int func) type = read_pci_config_byte(num, slot, func, PCI_HEADER_TYPE); - if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) { + if ((type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) { sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS); if (sec > num) early_pci_scan_bus(sec); } - if (!(type & 0x80)) + if (!(type & PCI_HEADER_TYPE_MFD)) return -1; return 0; From patchwork Fri Nov 24 09:09:14 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: 169320 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1022033vqx; Fri, 24 Nov 2023 01:10:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IETC2wrDtTarhZFG/ynLdqLNogPQE61aIjVFPRk8YpvYJ0WEZhHa1lzRX3vFYeUkg3EVimA X-Received: by 2002:a05:6a00:2791:b0:6cb:bc92:c73f with SMTP id bd17-20020a056a00279100b006cbbc92c73fmr2401891pfb.2.1700817013033; Fri, 24 Nov 2023 01:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817013; cv=none; d=google.com; s=arc-20160816; b=Ly2BqlXUZSbg1iL49C59FKUAa+R8XguA3vtEt/eAsojTM9g7zBOij9brNggaxnNNqM GQTyl9+u5AEeuN8LWpVPPpJHf/awPoSNUFMLKCdcRSKql2a7R5VuHd38Gr6cb+x2Yig0 VO0tS7SHRArHVZg7pJLlB6gPh/ZGcfZi/HZEkqpZalhmMnpahScH7PEueUPnIYrbh/5b xTfkkJ4Xr4pgTuPp3mbtTScCKtjrinUk/WHIB6heD1vyU2j67CqcGaw6x+ZUShe3WTDO X/0usW6VJyLYk+ZbhewvXQFRHIyGiEQku5rKpBWu+8k6W6f8Hxyxr4bjBEXwN6nUZswM JznA== 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=B9TnLSEe/1+OgviPSHpptOActWIhn+4+aTc71d7EPms=; fh=0K48XIVkMnclJM9rFeSHe41qtOFYm8O0wJVeef6TjO4=; b=Si1kU/LLIPB8KSYeEtVQvI/meHew//WzWh9vr4SHwwtDCmwK+K1NZudRZsdFUadKMg Cl9+3+Xa2/w9ACv3lXPfjZ2fFNmunhdzsAJLzJITPwg6y8vmgwQhhiRadF64apVtYXyE +P3QBDD+w5eZNlNVld7bjo5cO7Ak/UPuh8Anza9wKaWuL0Sinr9tOVJ/EXLwqP/hn8TK d23oC6q4Fa7FkwVU8CB0CpI6yEKiGnYs/4GjuenWRbiPFoC4nOHRc8RCcu7nGIPgf4O0 NoGVE8rF/kmWWj1GQ3lTl1a/eWEoTGWMu33/tzbbWjYTSsAqDvE3/49uYRqhqjMqok8t AEfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PkxD8I+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 23-20020a630c57000000b005b4a9b2f404si3073110pgm.710.2023.11.24.01.10.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:10:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PkxD8I+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id E58DD8226343; Fri, 24 Nov 2023 01:10:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232747AbjKXJJs (ORCPT + 99 others); Fri, 24 Nov 2023 04:09:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230012AbjKXJJp (ORCPT ); Fri, 24 Nov 2023 04:09:45 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B81A1BD for ; Fri, 24 Nov 2023 01:09:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700816993; x=1732352993; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dtKj/F4zR1OSHuWZtC50tt8Q6NyZniZKExIQR3zPCac=; b=PkxD8I+dE7xnQkKACmCEPhU8mbhaQhcQUyDT+hTymDoFvlqhnfXdUREr q64SAiK4KU7rM6pDjm6zYRvyipCMOasbBftTDe/keKlR+za1ZO+4kWZV5 dnS2g7ogcj6J9ZHKaMTBdEp5+KDryEHIXeiA3aSAfNR0pbwxOp3dpHmZ6 dxm+n9xXP6+xd/3fcQJ9ssWkZtLywEhzamQ3dyrykBr8ilHyAhRfM06OW 3dRlhndCh3KBwfgCCxLGHWeVGuVS+jyfXsnNzZ5xWmH4iyv5zgxaU7GnA dA306BArNJgds5yRCg5U/EONHXHDBiwRxUKB0dARCk/KMCNYhwBAaadA7 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="11066444" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="11066444" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="885220552" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="885220552" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:35 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Date: Fri, 24 Nov 2023 11:09:14 +0200 Message-Id: <20231124090919.23687-2-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=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:10:10 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783435900402225408 X-GMAIL-MSGID: 1783435900402225408 Replace 0x7f literals with PCI_HEADER_TYPE_MASK. Signed-off-by: Ilpo Järvinen --- arch/powerpc/sysdev/fsl_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 3868483fbe29..ef7707ea0db7 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -54,7 +54,7 @@ static void quirk_fsl_pcie_early(struct pci_dev *dev) /* if we aren't in host mode don't bother */ pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type); - if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE) + if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE) return; dev->class = PCI_CLASS_BRIDGE_PCI_NORMAL; @@ -581,7 +581,7 @@ static int fsl_add_bridge(struct platform_device *pdev, int is_primary) hose->ops = &fsl_indirect_pcie_ops; /* For PCIE read HEADER_TYPE to identify controller mode */ early_read_config_byte(hose, 0, 0, PCI_HEADER_TYPE, &hdr_type); - if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE) + if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE) goto no_bridge; } else { From patchwork Fri Nov 24 09:09:15 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: 169319 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1022021vqx; Fri, 24 Nov 2023 01:10:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEP4qSXY6SSH1aq/elEOLaJQzPvYQVq4HMAnz/oxefi/p1/7ge5e390MdG5mD1DxLKdOdlq X-Received: by 2002:a05:6a20:3c8d:b0:18b:f2d7:28c3 with SMTP id b13-20020a056a203c8d00b0018bf2d728c3mr1134192pzj.50.1700817012296; Fri, 24 Nov 2023 01:10:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817012; cv=none; d=google.com; s=arc-20160816; b=QuYQFl1ZY8I3eFTc7IXxOIVeDfcPrZMk3tDw5ggdEj8TlymNg6n8GdJkrOlzt9GquK IEPyF6/5bgQ6d2SKjqNtVG7qqZwfoBNMo8bUj8u53Er7U97D2Ir9yeCtBvPWpZrHYplb JAB3Z+F1Ip0f6Qh4QEUaHmoOMxconzOcOUiBsj+9oM1pHoyqs2zlG2IM04gq1jIEFXOX HlsLkprwae3Xyueb2u4+ij1lviZDyeX3HGGfuXR3n+wUcKQQDsWfIrNAjFW+ARqz/5QZ OiQ1YI+iRJHEA9uNr+fAiUl2VmzsArRQyDCfiapP11gyCrMDMl6WvhhstQqwzdwv78+B bauA== 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=bxU5cdpq0CEZf/nuh+HMd+ozX7QXNbhKxMQ+CXylZhY=; fh=LuZJko2f4bODnCb+1Tiej6TFnjGexplfR5jsRHity7Q=; b=YHMm7ZwFlt5czLwsGBVKbZBAjMXXQxsiG8gPBUZ+c/wE/va/Zue6en/p/YVZoRRuwX w5+ea9bk8eqBvxYyASNn7zgwNnnDGEfbxoNfuX1mGMcwJThp6vkJdF/180tN9X+nj9FJ GoHMV+QHXht5dfWsUTQXhs5IHkz1Zghup6lxklRSR0nQ2gBlBR6cw/eA8qsXbSaYzE8w DH3ItSn22XxP/aQulBB8pXF0Ray2diOPLJVJaf1xw2/kg0fvM6aACu67i1KsORRmkgXP IQ6QQXABJhPJg2RmqgFt9sJXZ9z37C1JiyXmzA4kwAMeEbdH7M/hmrLv+YSdd+Hwi9lG C14Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jvX3WNbK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id oc18-20020a17090b1c1200b00285275cc9ccsi3815412pjb.157.2023.11.24.01.10.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:10:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jvX3WNbK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id D648D8373506; Fri, 24 Nov 2023 01:10:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235036AbjKXJJ7 (ORCPT + 99 others); Fri, 24 Nov 2023 04:09:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232898AbjKXJJw (ORCPT ); Fri, 24 Nov 2023 04:09:52 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F20610D9 for ; Fri, 24 Nov 2023 01:09:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700817000; x=1732353000; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BnL04ZlzWqqNTZ2npfUPJmBwQJ698UjGRRwRa2RQJXc=; b=jvX3WNbKw1NHsoLtWj6D8VQ43aqKoQhaaJMqGw7QnIft40Kf4R+lCTtR ubbdXZNiLej/XlJhay5vPuwGdDNMwtrVOI5S3EiAoXLmCYdiG10eV7VAm kX3KjTuPT/U6EYJBERuX9S+UdlcsoxLjAn8JbWe8v6NHJ/osk35E418Bm uchuA14MZXESDNQneb3WX25z/K1uOjMHNQ/jhGjerxofeE+Kig1uH/YL9 Pro7StRaE7NHvSb4AZdvvR9eMpGm+3Cph1EQ2tUO3dELhn4x8/K7TttUY A5EcDnj0mYAK3VB0TlBlaf9bb0j1aelW78M2LwiA+Y1mSBogBUtAA9I7B w==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="11066494" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="11066494" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="885220557" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="885220557" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:43 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Chris Zankel , Max Filippov , linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD instead of literal Date: Fri, 24 Nov 2023 11:09:15 +0200 Message-Id: <20231124090919.23687-3-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=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:10:10 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783435899797210022 X-GMAIL-MSGID: 1783435899797210022 Replace literal 0x80 with PCI_HEADER_TYPE_MFD. While at it, convert found_multi into boolean. Signed-off-by: Ilpo Järvinen --- arch/xtensa/lib/pci-auto.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/xtensa/lib/pci-auto.c b/arch/xtensa/lib/pci-auto.c index aa6752237985..05fc02f9e1c7 100644 --- a/arch/xtensa/lib/pci-auto.c +++ b/arch/xtensa/lib/pci-auto.c @@ -11,6 +11,7 @@ * Based on work from Matt Porter */ +#include #include #include #include @@ -222,10 +223,11 @@ pciauto_postscan_setup_bridge(struct pci_dev *dev, int current_bus, int sub_bus, int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) { - int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0; + int sub_bus, pci_devfn, pci_class, cmdstat; unsigned short vid; unsigned char header_type; struct pci_dev *dev = &pciauto_dev; + bool found_multi = false; pciauto_dev.bus = &pciauto_bus; pciauto_dev.sysdata = pci_ctrl; @@ -261,11 +263,11 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) continue; if (!PCI_FUNC(pci_devfn)) - found_multi = header_type & 0x80; + found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type); pci_read_config_word(dev, PCI_VENDOR_ID, &vid); if (vid == 0xffff || vid == 0x0000) { - found_multi = 0; + found_multi = false; continue; } From patchwork Fri Nov 24 09:09:16 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: 169318 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1022005vqx; Fri, 24 Nov 2023 01:10:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3Kj54RlMudNfaHI+egIROYNmgw4OyGw3BZdGn5t8raVqxke02ujP7qveb+f1ALtyLVq50 X-Received: by 2002:a17:902:ced1:b0:1cf:5782:7d5c with SMTP id d17-20020a170902ced100b001cf57827d5cmr3051485plg.11.1700817010882; Fri, 24 Nov 2023 01:10:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817010; cv=none; d=google.com; s=arc-20160816; b=Wsp1IoqITqBiy5LGq0owklYsurTOCQlYxUPsrAZ0qie1AL4Z1fCeyl93gHokgJXanz aMCYDYzcs1Z/kqzqU3EoRv+8mJmHh/3ILbDappqYk+CJ1EkSfs41/D7RaO74BtxRSDKD etr/Q507QdSl9MSDhuTArufuo8LX4gYPZBucj7J2KRWvf+chsXFtjOZwTulsild332wR /U2gT/l2+/C56JM7UfQny+aPTRanUpQ+yakU+9n14IxmuDI4sa7Rw9aFmyBMcWn95P4M JiBwNr6m4eK8h4FY1zS1MZ6qfFycHguXayh92KSy1ohu71n3KOOXzo0JZbKABzuViVd4 ZeTg== 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=Ecp5Kik4RMgyQahD/UtWLJeBvVecBielg59MqdL0UXo=; fh=6cfrbESYOWoAQ4EhIxGwiCeQJsG9kOCP4eBD/14OTc0=; b=SQrlTvCREh4pzhVmwzXF4WoTQ7D38MVymg7rpKwQ9GLYHKfnmqt9gsQyiPCRFydJtw HVZBHAib1gvhqepwvSNCcRfjFwqv+UWvUaCo+yhCSs4aGADzTofMMwSRSmVEE9kuAmpn +e0MiGoeJFBNK5WxofSCXfr/ViA1ZOU/k8YgqiyANbbQhj4NldifpzbE6Eu8BtgRFOtq YM91053heDrzZty8x7rFEdrq403SqIZqBKbbXIZnp5a7wFyhgnh2m1DXnxbCTNgc96s7 /xPK5scVT3PV8AGI15f0tIBFGBEMfiDcCYW8KJ9JUGBhdc57E4t8jdfWgd+cl75PrN0Z Tp3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mFFtnsM5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c10-20020a170902d48a00b001cfa8efdf9esi339215plg.25.2023.11.24.01.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:10:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mFFtnsM5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id E59868373510; Fri, 24 Nov 2023 01:10:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232958AbjKXJJv (ORCPT + 99 others); Fri, 24 Nov 2023 04:09:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232199AbjKXJJt (ORCPT ); Fri, 24 Nov 2023 04:09:49 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72AC9D5A; Fri, 24 Nov 2023 01:09:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700816995; x=1732352995; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QYDq6Z5tWNEhZ/J5NePC3bRbFwseCQaqr4/k79zRT+I=; b=mFFtnsM5WrosV8S5HFysiMce0CybzIRKWfVqR+R1EaJ8RLYPv57i1vPq Tk1iknXmx0PqOPk4ZBYxLQPeU6bjmi/CKKAE1FaKAbsHs7+SOSMtvyGTm S35YzVGCtbAn2H+NgR/JY1ZxTtAyBQUBpJRyJJin+n0FXLn5y/MZGEQKW 3+i3dDLACIDEH1GJyYPaVL6Eh7xKN4beZnP0EXU5tLsH9g5p9LntvNY3V iYjpY3h/vbJ9IwxH5CjbWT8qHBLAtVzGVdduvxl+sbEtgjfKMXjzmGq6K T9RxboqHsPGo5PGKBUsMz0eOYQyeKE3Ipz1PALXVhkJchmyG/hAM/96co Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="478603449" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="478603449" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="15911569" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:09:52 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 4/6] scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal Date: Fri, 24 Nov 2023 11:09:16 +0200 Message-Id: <20231124090919.23687-4-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=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:10:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783435897989595510 X-GMAIL-MSGID: 1783435897989595510 Replace literal 0x80 with PCI_HEADER_TYPE_MFD. Signed-off-by: Ilpo Järvinen --- drivers/scsi/lpfc/lpfc_sli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 9386e7b44750..4ac6afd3c2fe 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -4875,7 +4875,7 @@ void lpfc_reset_barrier(struct lpfc_hba *phba) lockdep_assert_held(&phba->hbalock); pci_read_config_byte(phba->pcidev, PCI_HEADER_TYPE, &hdrtype); - if (hdrtype != 0x80 || + if (hdrtype != PCI_HEADER_TYPE_MFD || (FC_JEDEC_ID(phba->vpd.rev.biuRev) != HELIOS_JEDEC_ID && FC_JEDEC_ID(phba->vpd.rev.biuRev) != THOR_JEDEC_ID)) return; 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); From patchwork Fri Nov 24 09:09:18 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: 169321 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1022209vqx; Fri, 24 Nov 2023 01:10:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEW+OLcQy07W14Vj/J66GZKEOyIihim25GWSO3HeS8vjBacaUy9Kjz9cG7H7/RWb1i/R4yT X-Received: by 2002:a17:90b:3b4e:b0:285:9912:a4b0 with SMTP id ot14-20020a17090b3b4e00b002859912a4b0mr65633pjb.24.1700817032577; Fri, 24 Nov 2023 01:10:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817032; cv=none; d=google.com; s=arc-20160816; b=PuqSpS/R6m9v3RvKFvmZ2rku3Rc5M2qDZ/yOeb+AKmw6rCsAEC3Q+y+YT35xhvkZ7M cHBG+cho2F1A3taUqZccVWzXRQ5CTHKRxh8Bw3GV9Ft3LqIYbhbM8BsRlftuFZcT0CT0 BUdnKYc6c5V4hMinadT9kSMBe+g4Rv/57z7S5yOFzmtnoummYF8JQNoZqOEAJ3UDYUzM SWxUF6/oGwQCMrX/DQ0zwBx3JyIFy2PaBpW4pekpBJstXxr5yy20QjCLZdqGcZivaEgT /f7C+PQL2E8XX0fxudGJmz1JVrmdE8TMqj9tcV6UGXVMA/6MWat6OHCnsQ/0i4dVUA5Q gJoQ== 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=F7qkjbpRR0U6JlssN/d9gXUjczutDOWvn5Z6QEY22JU=; fh=DTIXnHNmJa8roWQwAOCRBjPUb+K1Mtzg+HEM7FmsrAo=; b=03KqofAGNwHlhCU7dGyi2RGwTZv93GQq8iG/B0TNo92gpZzIYQKuZwUcOghVw5Q4Yz 26N9FhjIVHKALEYIYqnGSV/rgCyr/KrcX/8nQ4hzkB5LAlPXAzSIzcAsVS9vS9C3SqQC ItzPE3/1qWr6DFAXSWLoTATFtjCprWPZRUtsAdseJTQJ0oNFkG+cJTfMc/gJzxz3hR0l 0VDuQWEHqDyxbT4OubQ6nWmlSSbWHNM1HO71iH5kzM9eH5sIlmZWRTacxe74cmGplSqO fqWbf7+DssFYgsUVDKyfvOV6milDoLrpJDNu0cIn+XhKl5jVwj1myxktR5gFP0weQwn2 r8HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mLbBx5hK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id i15-20020a17090acf8f00b002774c17dd73si3154755pju.11.2023.11.24.01.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:10:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mLbBx5hK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 6515880A1385; Fri, 24 Nov 2023 01:10:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233039AbjKXJKQ (ORCPT + 99 others); Fri, 24 Nov 2023 04:10:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233995AbjKXJKH (ORCPT ); Fri, 24 Nov 2023 04:10:07 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B49F910EF; Fri, 24 Nov 2023 01:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700817011; x=1732353011; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=66TLivhScrf9PDmhJ5Qy/pTIXujF0a8LJJSvL83bbzY=; b=mLbBx5hKKnigSec5QNzGIf4VS5jO637IueqGnXW9/HYzVYbBpp1x4vYS w+Qz7zG4aF3Nn+QflC+JPgh06zeuXrb0xCAqgvGLVaW2tWPBsUoucquEc S7FEgUBm8RGDAlLSKOrGFYJxu9RkZoHq64121wbmOJQrHHRnhZ8jqWqC5 PuQhECYoW7CEH138YySVyUwtZETynP8BAUhFeFQ+WUDZhWOSaAw/LmiJ0 885+k6TN1vPOrpafAdkIOQHjCMhAzt+MlzYYbxU7TuqVQtjtNQveMlNFs sxdXyS63zSeJaDiaiNvv4quegVMQEvDEb3aMIzJCJX3dSsgf2ESzE8S5I w==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="478603519" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="478603519" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:10:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="15911703" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 01:10:09 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal Date: Fri, 24 Nov 2023 11:09:18 +0200 Message-Id: <20231124090919.23687-6-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=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Fri, 24 Nov 2023 01:10:25 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783435920483924053 X-GMAIL-MSGID: 1783435920483924053 Replace literal 0x7f with PCI_HEADER_TYPE_MASK. Signed-off-by: Ilpo Järvinen --- drivers/bcma/driver_pci_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c index aa0581cda718..ed3be52ab63d 100644 --- a/drivers/bcma/driver_pci_host.c +++ b/drivers/bcma/driver_pci_host.c @@ -280,7 +280,7 @@ static u8 bcma_find_pci_capability(struct bcma_drv_pci *pc, unsigned int dev, /* check for Header type 0 */ bcma_extpci_read_config(pc, dev, func, PCI_HEADER_TYPE, &byte_val, sizeof(u8)); - if ((byte_val & 0x7F) != PCI_HEADER_TYPE_NORMAL) + if ((byte_val & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_NORMAL) return cap_ptr; /* check if the capability pointer field exists */