From: Darren Hart <dvhart@linux.intel.com>
To: Linux Kernel Mailing List <linux-kernel@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>,
netdev@vger.kernel.org
Subject: [PATCH 2/3] pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32
Date: Fri, 12 Jul 2013 17:58:06 -0700 [thread overview]
Message-ID: <7320fe759f7076354707346a6d98b031f64f4039.1373676797.git.dvhart@linux.intel.com> (raw)
In-Reply-To: <1373677087-7747-1-git-send-email-dvhart@linux.intel.com>
In-Reply-To: <ce5dd365d05f8747d269aa74e0bb929935d9cdee.1373676797.git.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-13 0:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-13 0:58 [PATCH 0/3] MinnowBoard Support V2 (Serial and Ethernet) Darren Hart
2013-07-13 0:58 ` [PATCH 1/3] pch_uart: Use DMI interface for board detection Darren Hart
2013-07-13 0:58 ` Darren Hart [this message]
2013-07-13 0:58 ` [PATCH 3/3] pch_gbe: Add MinnowBoard support Darren Hart
2013-07-13 1:10 ` Joe Perches
2013-07-13 5:52 ` Darren Hart
2013-07-13 1:17 ` Greg KH
2013-07-13 5:46 ` Darren Hart
2013-07-13 6:26 ` Greg KH
2013-07-13 16:08 ` Darren Hart
2013-07-13 17:09 ` Greg KH
2013-07-13 19:33 ` Darren Hart
2013-07-15 8:34 ` Andy Shevchenko
2013-07-15 20:41 ` Darren Hart
2013-07-18 17:05 ` Darren Hart
2013-07-15 20:55 ` Darren Hart
2013-07-17 20:13 ` Darren Hart
2013-07-17 20:15 ` [PATCH 1/3] pch_uart: Use DMI interface for board detection Darren Hart
2013-07-17 21:55 ` Greg Kroah-Hartman
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=7320fe759f7076354707346a6d98b031f64f4039.1373676797.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=linux-kernel@vger.kernel.org \
--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).