From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
netdev@vger.kernel.org,
Kweh Hock Leong <hock.leong.kweh@intel.com>,
"David S . Miller" <davem@davemloft.net>,
Vince Bridgers <vbridgers2013@gmail.com>,
Rayagond K <rayagond@vayavyalabs.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 1/5] stmmac: pci: use defined constant instead of magic number
Date: Mon, 3 Nov 2014 15:02:13 +0200 [thread overview]
Message-ID: <1415019737-32736-2-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1415019737-32736-1-git-send-email-andriy.shevchenko@linux.intel.com>
The last standard PCI resource is defined as PCI_STD_RESOURCE_END. Thus, we
could use it instead of plain integer.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index e17a970..e45794d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -90,7 +90,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
}
/* Get the base address of device */
- for (i = 0; i <= 5; i++) {
+ for (i = 0; i <= PCI_STD_RESOURCE_END; i++) {
if (pci_resource_len(pdev, i) == 0)
continue;
addr = pci_iomap(pdev, i, 0);
--
2.1.1
next prev parent reply other threads:[~2014-11-03 13:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-03 13:02 [PATCH v2 0/5] stmmac: pci: various cleanups and fixes Andy Shevchenko
2014-11-03 13:02 ` Andy Shevchenko [this message]
2014-11-03 13:02 ` [PATCH v2 2/5] stmmac: pci: convert to use dev_pm_ops Andy Shevchenko
2014-11-03 13:02 ` [PATCH v2 3/5] stmmac: pci: use managed resources Andy Shevchenko
2014-11-03 13:02 ` [PATCH v2 4/5] stmmac: pci: convert to use dev_* macros Andy Shevchenko
2014-11-03 13:02 ` [PATCH v2 5/5] stmmac: pci: remove FSF address Andy Shevchenko
2014-11-03 20:57 ` David Miller
2014-11-04 9:06 ` Andy Shevchenko
2014-11-04 16:25 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415019737-32736-2-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=hock.leong.kweh@intel.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=rayagond@vayavyalabs.com \
--cc=vbridgers2013@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).