From patchwork Thu Mar 23 17:36:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13185943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17229C74A5B for ; Thu, 23 Mar 2023 17:36:05 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.514002.795878 (Exim 4.92) (envelope-from ) id 1pfOqs-0000yK-M0; Thu, 23 Mar 2023 17:35:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 514002.795878; Thu, 23 Mar 2023 17:35:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pfOqs-0000yD-Ik; Thu, 23 Mar 2023 17:35:50 +0000 Received: by outflank-mailman (input) for mailman id 514002; Thu, 23 Mar 2023 17:35:48 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pfOqq-0000iP-Fk for xen-devel@lists.xenproject.org; Thu, 23 Mar 2023 17:35:48 +0000 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 224efbf1-c9a1-11ed-b464-930f4c7d94ae; Thu, 23 Mar 2023 18:35:44 +0100 (CET) Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 10:35:37 -0700 Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 23 Mar 2023 10:35:25 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EA7F02AA; Thu, 23 Mar 2023 19:36:11 +0200 (EET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 224efbf1-c9a1-11ed-b464-930f4c7d94ae DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679592944; x=1711128944; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+tkQnp5raP0E2HuwxHdpBNe2fRW/pW0M4CrsRaTr0mM=; b=RaR3c+Ko1Set9wT9fzmlryq8URPSnPkdDXMihD02D1y7y14x1E4Ltm1W eDuK8/EKQOKpxFbeZFhe8Q8JUS4yhltBuv7bUNGNe2c3PrddhvKOv+Vl/ RIFx8NM8JvydwvUNPxkwhtyUeyqfC464qnWk62Xeu3wVQRAlpGVHpDq4Q HLDQC7v+SohVNP/vqoeWK5kCJxtGOpRU/Mf05iuKtVlgxPuNKPg5rHYkQ hYl05MuXKfk1uEzjAsGpsJktCqcsLBDgHeWm21LU5plmNUaDugDWSqVxE rYKtnL7+TBJR1XFeeG+eKpNZVydrNiLCfukz9NRVLfxoMrK2gyPZactWf w==; X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="327969628" X-IronPort-AV: E=Sophos;i="5.98,285,1673942400"; d="scan'208";a="327969628" X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="675794214" X-IronPort-AV: E=Sophos;i="5.98,285,1673942400"; d="scan'208";a="675794214" From: Andy Shevchenko To: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , Andy Shevchenko , Mika Westerberg , =?utf-8?q?Krzysztof_Wilc?= =?utf-8?q?zy=C5=84ski?= , Michael Ellerman , Randy Dunlap , Arnd Bergmann , Niklas Schnelle , Bjorn Helgaas , "Rafael J. Wysocki" , =?utf-8?q?Pali_Roh=C3=A1r?= , "Maciej W. Rozycki" , Juergen Gross , Dominik Brodowski , linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org Cc: Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Thomas Bogendoerfer , Nicholas Piggin , Christophe Leroy , Anatolij Gustschin , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S. Miller" , Bjorn Helgaas , Stefano Stabellini , Oleksandr Tyshchenko Subject: [PATCH v7 4/6] EISA: Convert to use less arguments in pci_bus_for_each_resource() Date: Thu, 23 Mar 2023 19:36:08 +0200 Message-Id: <20230323173610.60442-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230323173610.60442-1-andriy.shevchenko@linux.intel.com> References: <20230323173610.60442-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 The pci_bus_for_each_resource() can hide the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko Reviewed-by: Krzysztof Wilczyński Reviewed-by: Philippe Mathieu-Daudé --- drivers/eisa/pci_eisa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/eisa/pci_eisa.c b/drivers/eisa/pci_eisa.c index 930c2332c3c4..8173e60bb808 100644 --- a/drivers/eisa/pci_eisa.c +++ b/drivers/eisa/pci_eisa.c @@ -20,8 +20,8 @@ static struct eisa_root_device pci_eisa_root; static int __init pci_eisa_init(struct pci_dev *pdev) { - int rc, i; struct resource *res, *bus_res = NULL; + int rc; if ((rc = pci_enable_device (pdev))) { dev_err(&pdev->dev, "Could not enable device\n"); @@ -38,7 +38,7 @@ static int __init pci_eisa_init(struct pci_dev *pdev) * eisa_root_register() can only deal with a single io port resource, * so we use the first valid io port resource. */ - pci_bus_for_each_resource(pdev->bus, res, i) + pci_bus_for_each_resource(pdev->bus, res) if (res && (res->flags & IORESOURCE_IO)) { bus_res = res; break;