summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorThomas Miletich2011-03-28 14:48:59 +0200
committerMichael Brown2011-03-28 14:57:42 +0200
commitdb156f5be6379a7cfa5ad01f55c9e12e3ab75151 (patch)
tree3560620422c60d953ac2bfd80d1d6336b1707da0 /src/drivers/net/forcedeth.c
parent[exeprefix] Add .exe prefix (diff)
downloadipxe-db156f5be6379a7cfa5ad01f55c9e12e3ab75151.tar.gz
ipxe-db156f5be6379a7cfa5ad01f55c9e12e3ab75151.tar.xz
ipxe-db156f5be6379a7cfa5ad01f55c9e12e3ab75151.zip
[forcedeth] Avoid unused-but-set variable warning in gcc 4.6
Avoid unused-but-set variable warning in gcc 4.6 which was introduced by commit 9215b7f ("[forcedeth] Clear the MII link status register on link status changes"). Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/forcedeth.c')
-rw-r--r--src/drivers/net/forcedeth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c
index 918f502f..a54eae44 100644
--- a/src/drivers/net/forcedeth.c
+++ b/src/drivers/net/forcedeth.c
@@ -968,10 +968,9 @@ forcedeth_link_status ( struct net_device *netdev )
{
struct forcedeth_private *priv = netdev_priv ( netdev );
void *ioaddr = priv->mmio_addr;
- u32 mii_status;
- /* Clear the MII link change status */
- mii_status = readl ( ioaddr + NvRegMIIStatus );
+ /* Clear the MII link change status by reading the MIIStatus register */
+ readl ( ioaddr + NvRegMIIStatus );
writel ( NVREG_MIISTAT_LINKCHANGE, ioaddr + NvRegMIIStatus );
if ( nv_update_linkspeed ( priv ) == 1 )