From: Thomas Miletich Date: Mon, 28 Mar 2011 12:48:59 +0000 (+0200) Subject: [forcedeth] Avoid unused-but-set variable warning in gcc 4.6 X-Git-Tag: v1.20.1~2183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db156f5be6379a7cfa5ad01f55c9e12e3ab75151;p=thirdparty%2Fipxe.git [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 Signed-off-by: Michael Brown --- diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c index 918f502f4..a54eae441 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 )