Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp695370ybl; Fri, 16 Aug 2019 02:29:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxS1xROnsH7VrT3vGA9rEesu8iB1QyAi5PM6M9qvd3IHCRX+Yz4FWsGsZbkPBWBO1z8Trff X-Received: by 2002:a62:f208:: with SMTP id m8mr9559511pfh.108.1565947786883; Fri, 16 Aug 2019 02:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565947786; cv=none; d=google.com; s=arc-20160816; b=fRNGKf2pA/k8aJ+KwAKYVJFfHTgC69YV4aZhGh3Mp2AO2GSLSNwRhXZxtdbTEOp9Ja th07bptBgQ6qNzFjZiMTmHSGdBi5Z0ehM4CFCpZ1wE3K5hRQo/rywBt50ekF4tbN2Dl2 q+Rvin/pMiuDKj0OmDbzAyfZCR4WqBg2bkqv/rVoJ3wp6SlSNjhOvLthyUnjaYZmElK3 7i6BTVHPLXHRZvyeSJzmLGJ8fJC99CuLAjcmS39aFZ+dMsr/bYOfvfiu22C06K+W0yc9 ICnOBiqWTBxOm8g2EtuH8obloIpjN7XCOH6tkvQmmse0yxwUasXZZzENChJ5YGHG4ISi 38Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8wZECesGtaRN/hRYulA3qe8bal21Vcfb+3jseiWhwfY=; b=c64U3+95yrS2GPvNYYfciAeaDawwwwb8AMqb7kPaX1yNCF/mrse0vONjnLEoCmVPCv h0cANoXBFTPhSRt12JJfpJp2isKOBMXrL2xDeybzT75RpF3Tx0n13I3qN+a5NfPHKR4+ SEc/6ZHXM1NVd2Y6UoSe4DO2bL9QGN4988MDFM4jVZp5tL0JShYLDVWkv7YKxwQfLOf+ 1JYRRpN+pKgfmI4QuWW3HVsl9WSGezvL3+rYDkwz06k3tbKhiNPu4/QYgZhoYJmkt5rT PdqNxljML4E6efVMu9MbGi+dGdYMPCuMnHOmYcxvOZEDWJEh+qxDQBzgwjvu1GGsoqpq vI9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z186si3537521pgd.162.2019.08.16.02.29.29; Fri, 16 Aug 2019 02:29:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbfHPJ0k (ORCPT + 99 others); Fri, 16 Aug 2019 05:26:40 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43193 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbfHPJ0R (ORCPT ); Fri, 16 Aug 2019 05:26:17 -0400 Received: by mail-wr1-f66.google.com with SMTP id y8so889763wrn.10; Fri, 16 Aug 2019 02:26:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8wZECesGtaRN/hRYulA3qe8bal21Vcfb+3jseiWhwfY=; b=bkPJ9CukYSfviTLfUNvMZxjAt0wpK7fRb62iizYE6pUiXOckclHEiifu+aH2/a3Dco FDmQq/sDpoz+zAHBOaipyq86Wo7FmS5Fyu1Rtwgbe0oS5qbSz9Eaq09EYMdNedKJxUt2 TW8H6E2zxzVZIJkpHKJNYdumAxkUvJCGLMef+zEFk+K4Tk64rQCU+xj9rQC42ZVIkiOE Fo/bVhuIo4ODOdAjgYmOK39mJv5fP39Kyz8s4N8Q7s0uJ6nchxhmKOguIJKjFUYkz/Rr 5KnnLmTE4sLYnlOx0AQBowUveHAafgkAmYQMynEVUmYCn/MfpF79eE2rWCoAlvNf54wh 5dJw== X-Gm-Message-State: APjAAAU+k6npsBphoCa4GadmvxVccGAqC+QfWJE04cZvYdWWYE/9hiu5 cHdScLyQkZK3A554IKmCNKw= X-Received: by 2002:adf:f28d:: with SMTP id k13mr9032006wro.19.1565947576600; Fri, 16 Aug 2019 02:26:16 -0700 (PDT) Received: from localhost.localdomain (broadband-188-32-48-208.ip.moscow.rt.ru. [188.32.48.208]) by smtp.googlemail.com with ESMTPSA id q20sm16521138wrc.79.2019.08.16.02.26.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Aug 2019 02:26:16 -0700 (PDT) From: Denis Efremov To: Bjorn Helgaas Cc: Denis Efremov , Jose Abreu , netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 05/10] net: dwc-xlgmac: Loop using PCI_STD_NUM_BARS Date: Fri, 16 Aug 2019 12:24:32 +0300 Message-Id: <20190816092437.31846-6-efremov@linux.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190816092437.31846-1-efremov@linux.com> References: <20190816092437.31846-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Refactor loops to use 'i < PCI_STD_NUM_BARS' instead of 'i <= PCI_STD_RESOURCE_END'. Signed-off-by: Denis Efremov --- drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c b/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c index 386bafe74c3f..fa8604d7b797 100644 --- a/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c +++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-pci.c @@ -34,7 +34,7 @@ static int xlgmac_probe(struct pci_dev *pcidev, const struct pci_device_id *id) return ret; } - for (i = 0; i <= PCI_STD_RESOURCE_END; i++) { + for (i = 0; i < PCI_STD_NUM_BARS; i++) { if (pci_resource_len(pcidev, i) == 0) continue; ret = pcim_iomap_regions(pcidev, BIT(i), XLGMAC_DRV_NAME); -- 2.21.0