From patchwork Fri Aug 16 09:24:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis Efremov (Oracle)" X-Patchwork-Id: 11097393 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E2DCF912 for ; Fri, 16 Aug 2019 09:26:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2407286C6 for ; Fri, 16 Aug 2019 09:26:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C605D28995; Fri, 16 Aug 2019 09:26:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D7AD286C6 for ; Fri, 16 Aug 2019 09:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727076AbfHPJ0j (ORCPT ); Fri, 16 Aug 2019 05:26:39 -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-Google-Smtp-Source: APXvYqwuxfNSFouvi+v+ALP0jEZo8ZXiE/rQwczcKeo2zAKeyWd11YX4OO/5BLo8ME3TczTKhqp5Mg== 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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);