Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp933270rdh; Fri, 24 Nov 2023 01:10:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8NWiyWaLKmbnSPI9f8/Q/kxC7naH5rGdNNolrYCfJDfgSkEig1gHGfyy4xy6jzd0tP2H4 X-Received: by 2002:a54:4587:0:b0:3a9:b9eb:998e with SMTP id z7-20020a544587000000b003a9b9eb998emr1984530oib.51.1700817016558; Fri, 24 Nov 2023 01:10:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700817016; cv=none; d=google.com; s=arc-20160816; b=N4Z/QGF5Hx8O+ecU2icXgUzsSp1lwDZcXOZpX+ybh9kFJfYXwia/MjGF+6cR7Yq/KD PMlw1D+d4hQoAodlTLUaYlOeY7bNf+bH3pESgo/X2+bswvAKuhsbxhXYpScofikdqV2Z 9eDThgzsbCcoUHn7xY5h5ZiXaoF1/6KlqQ5dcrfsfEDPshhFrfIkYcRmMoCQKO1glvmi GAOnQdp6cEauDOGz08zRz1STBh1LqMDRQvnc4m1Z79o1l+J9J4hAyEPFF57VIbXVOJiR UcSjqHK8RfeYB1w8VrfZ0A9dBKNykjqITan4TpQ7dprm02wcv/ieO9J65qxP8/re3dce oF+Q== 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 Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id bm6-20020a656e86000000b005a0737404a7si3426144pgb.258.2023.11.24.01.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 01:10:16 -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 517E58226347; Fri, 24 Nov 2023 01:10:14 -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=20J=C3=A4rvinen?= To: Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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:14 -0800 (PST) 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 { -- 2.30.2