Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1881080rwi; Thu, 3 Nov 2022 10:04:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52QaFXXD6EIQh1KpER56wKeiTTAH7GX8sqvVT9IUywnZUfFaeBDaRZxIzRN9GgcPBH+2nH X-Received: by 2002:a17:902:ce82:b0:187:3591:edac with SMTP id f2-20020a170902ce8200b001873591edacmr15779520plg.153.1667495089703; Thu, 03 Nov 2022 10:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667495089; cv=none; d=google.com; s=arc-20160816; b=skBj5Bh3xOvDaRfMfHfv12tSaKg9MWUbmybTpXf2zaiAD4QFhY2HpIOp/eDpOob0Gc DF8yLEEs5s5tN+gW5o47in/jHPdHd78fCvQ4KgtwKT071mZXiVSl5qsBUkYrExz799EP 87WXEJnHvNmgm/PV5cp4qXYe8VXOWCLt0/BXcRBWOtwahrrzVznw42HQJ1zvVEHQOawb 30H88OpVV85P+XK616KD+yHQfKP6qneaCGRIzsyZLkIhlNhii1+yUdsfN0Qbp1aGShlp ECdV1NIb+O6J835VPuzmSNDhbOkHYg/uBTY5IT/RN2OJpNCqOud7JR/pMwV/ylaPGU/o g0BA== 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=116YKWMv0Jblpl2kyjcsnQYXUs42BfItz/V64WWeJUk=; b=wec0P+rVYsqrkYkBThVjlJnfQcB1Wp/bHFrqxHXUnKaXyKJpn5n8Ygt6EYamcuKrA8 AvVdnpAtsF9SqVOY2on742As7MsNGGMWpcIpG8tlV/nL1v92rScAJUEQMm324BHOp3uK MzKAzWBuloPsesFnbxvOvL+mMpOPGXILJAwTVbab4foZrtLtnyVDTGZV+QVIwoslPAjj 29YSl4hCa9yX6xI7uqbqh4xL3b9B2gy4ndxK86DTTQJA3RbvC+RsAP+q2hpJXeBnb5iI TkGv+G9DsUc0A3MBWxPvrTlvXPosuHj12hZ3YCExEp0R1mmd2TMW4vjZ1TcUNwbfsCHM RcaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dkXSM4wH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p18-20020a62ab12000000b005632e26e7ffsi1237641pff.309.2022.11.03.10.04.35; Thu, 03 Nov 2022 10:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dkXSM4wH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbiKCQrq (ORCPT + 98 others); Thu, 3 Nov 2022 12:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232530AbiKCQrL (ORCPT ); Thu, 3 Nov 2022 12:47:11 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB60119C1B; Thu, 3 Nov 2022 09:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667493996; x=1699029996; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EaNuN468AX7oVVNzygbZKjeVdiuKUVO8jdpIxMpvwBE=; b=dkXSM4wHOuYtUhyvyq75B8MweJmqi5yuqRLxPmabh/asMdBZbjpgjd74 rDihfdGNWTqbsKdh7uAlseHOg1bQWN1Zfz2H17z54thIuMJtzP4mYTXtL HR5bLP/DuYI+Uw9sZIR4BFATAslnskiGBXR1KlNTKQ476tVSVFFR68fO/ 31ALWtoTMVHIjfN9j7bOZ9J1KwTounrfbud+H4VbXHdtj6gJk3tt9FwPk ucJLTyaT68ARU2UOVO/XsgvWB3DKaf6Y2q9bSnEnYCPTCHAks7FAxX3MF OnVO7v+9K7t7R9DvrReoi2rKNS5qs4MeH168H6XvLB0NyB9F+A8+TqHxC g==; X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="297198933" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="297198933" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 09:46:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10520"; a="809735378" X-IronPort-AV: E=Sophos;i="5.96,134,1665471600"; d="scan'208";a="809735378" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 03 Nov 2022 09:46:29 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B75E129D; Thu, 3 Nov 2022 18:46:52 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Andy Shevchenko , Mika Westerberg , Michael Ellerman , Arnd Bergmann , Bjorn Helgaas , "Rafael J. Wysocki" , 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, sparclinux@vger.kernel.org, linux-pci@vger.kernel.org, xen-devel@lists.xenproject.org Cc: Miguel Ojeda , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Thomas Bogendoerfer , Nicholas Piggin , Christophe Leroy , "David S. Miller" , Bjorn Helgaas , Stefano Stabellini , Oleksandr Tyshchenko Subject: [PATCH v2 3/4] EISA: Convert to use pci_bus_for_each_resource_p() Date: Thu, 3 Nov 2022 18:46:43 +0200 Message-Id: <20221103164644.70554-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221103164644.70554-1-andriy.shevchenko@linux.intel.com> References: <20221103164644.70554-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pci_bus_for_each_resource_p() hides the iterator loop since it may be not used otherwise. With this, we may drop that iterator variable definition. Signed-off-by: Andy Shevchenko --- 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..907b86384396 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_p(pdev->bus, res) if (res && (res->flags & IORESOURCE_IO)) { bus_res = res; break; -- 2.35.1