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 {