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; }