Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp933269rdh; Fri, 24 Nov 2023 01:10:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyCMv1Q6tCHvXH8wO9waRwm/zxTdKGlrDVyWTyAqDpHB4wfL+aoqHiQYvXbVHuMgOflUvt X-Received: by 2002:a05:6a20:43a6:b0:18b:2032:e7a8 with SMTP id i38-20020a056a2043a600b0018b2032e7a8mr2596070pzl.24.1700817016542; 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=iiB7WadHJVdVNfAM1OFmfFHF1cfehVemW6gKfICitnKoZed98ogczCWy2ynYlIR42g Dzpqum4N08KygZHQB7GHchTooJnOnQqnrzejkiFRFN5XdeW0Zm/qgW2zaDgqeQfpmtxW zSKMwGJcJQiIItcDPkwte4PGMq3goh4uqaoJXkv+hl6UCXPnSlzdO8bUqgLrZ+aoeRIx fxQ6kLQ7nW5kR+ju4Pej4aB3LhCTE74vsMp9J4c0JYnG5UQKa5xGJh8F/aBjYpkXTLMc EDNOPjARgE1PX6hwlEdvQw8qPkeo+08l5222nDjXOQ3c4/Kq/sEiI3IdtnsQbcDIF0MV 7e7w== 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 Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y6-20020a17090a474600b0028516fe2bffsi3644668pjg.186.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.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 0CC32837351B; Fri, 24 Nov 2023 01:10:14 -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=20J=C3=A4rvinen?= To: Chris Zankel , Max Filippov , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=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 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 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:14 -0800 (PST) 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; } -- 2.30.2