]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[forcedeth] Avoid unused-but-set variable warning in gcc 4.6
authorThomas Miletich <thomas.miletich@gmail.com>
Mon, 28 Mar 2011 12:48:59 +0000 (14:48 +0200)
committerMichael Brown <mcb30@ipxe.org>
Mon, 28 Mar 2011 12:57:42 +0000 (13:57 +0100)
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>
src/drivers/net/forcedeth.c

index 918f502f4b316c3661edb5836af7bd2c722dda87..a54eae441f3496d71ff7f21d6f88a1baf7ba43dd 100644 (file)
@@ -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 )