From: Darren Hart <dvhart@linux.intel.com>
To: Linux Net Dev <netdev@vger.kernel.org>
Cc: Darren Hart <dvhart@linux.intel.com>,
"David S. Miller" <davem@davemloft.net>,
"H. Peter Anvin" <hpa@zytor.com>,
Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH net-next 1/2] pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32
Date: Wed, 17 Jul 2013 13:10:42 -0700 [thread overview]
Message-ID: <001ee275d6df06f3bb84ee5d214f308a4f20d4be.1374091736.git.dvhart@linux.intel.com> (raw)
In-Reply-To: <1374091843-1521-1-git-send-email-dvhart@linux.intel.com>
Avoid using magic numbers when we have perfectly good defines just lying
around.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Peter Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: netdev@vger.kernel.org
---
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index ab1039a..749ddd9 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -682,7 +682,7 @@ static int pch_gbe_init_phy(struct pch_gbe_adapter *adapter)
}
adapter->hw.phy.addr = adapter->mii.phy_id;
netdev_dbg(netdev, "phy_addr = %d\n", adapter->mii.phy_id);
- if (addr == 32)
+ if (addr == PCH_GBE_PHY_REGS_LEN)
return -EAGAIN;
/* Selected the phy and isolate the rest */
for (addr = 0; addr < PCH_GBE_PHY_REGS_LEN; addr++) {
--
1.8.3.1
next prev parent reply other threads:[~2013-07-17 20:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-17 20:10 [PATCH net-next 0/2] pch_gbe: Minow fix and MinnowBoard support Darren Hart
2013-07-17 20:10 ` Darren Hart [this message]
2013-07-17 20:10 ` [PATCH net-next 2/2] pch_gbe: Add " Darren Hart
2013-07-18 8:14 ` Andy Shevchenko
2013-07-18 17:12 ` Darren Hart
2013-07-19 8:48 ` Andy Shevchenko
2013-07-22 20:54 ` Darren Hart
2013-07-18 0:58 ` [PATCH net-next 0/2] pch_gbe: Minow fix and " David Miller
2013-07-22 21:41 [PATCH V2 net-next 0/2] pch_gbe: Add " Darren Hart
2013-07-22 21:41 ` [PATCH net-next 1/2] pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32 Darren Hart
2013-07-25 5:10 [PATCH V3 net-next 0/2] pch_gbe: Add MinnowBoard support Darren Hart
2013-07-25 5:10 ` [PATCH net-next 1/2] pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32 Darren Hart
2013-07-25 8:46 [PATCH V4 net-next 0/2] pch_gbe: Add MinnowBoard support Darren Hart
2013-07-25 8:46 ` [PATCH net-next 1/2] pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32 Darren Hart
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=001ee275d6df06f3bb84ee5d214f308a4f20d4be.1374091736.git.dvhart@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.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).