]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: axi_emac: Remove compilation warnings
authorMichal Simek <michal.simek@xilinx.com>
Fri, 25 Jan 2013 13:46:35 +0000 (14:46 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 4 Feb 2013 10:39:31 +0000 (11:39 +0100)
Remove compilation warnings:
xilinx_axi_emac.c: In function 'setup_phy':
xilinx_axi_emac.c:274:26: warning: unused variable 'ret' [-Wunused-variable]
xilinx_axi_emac.c:274:6: warning: unused variable 'i' [-Wunused-variable]
xilinx_axi_emac.c:273:6: warning: unused variable 'phyreg' [-Wunused-variable]
xilinx_axi_emac.c: In function 'axi_dma_init':
xilinx_axi_emac.c:484:7: warning: suggest parentheses around operand of
 '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
xilinx_axi_emac.c: In function 'axiemac_send':
xilinx_axi_emac.c:593:4: warning: suggest parentheses around operand of
 '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/xilinx_axi_emac.c

index 97cc21df3791a3fc7218bdbb04017e53909ac86c..1ff9abf94da74b2c3961ba53bd94eef5653d2947 100644 (file)
@@ -270,8 +270,7 @@ static void phy_detection(struct eth_device *dev)
 static int setup_phy(struct eth_device *dev)
 {
 #ifdef CONFIG_PHYLIB
-       u16 phyreg;
-       u32 i, speed, emmc_reg, ret;
+       u32 speed, emmc_reg;
        struct axidma_priv *priv = dev->priv;
        struct axi_regs *regs = (struct axi_regs *)dev->iobase;
        struct phy_device *phydev;
@@ -479,8 +478,8 @@ static void axi_dma_init(struct eth_device *dev)
        while (timeout--) {
                /* Check transmit/receive channel */
                /* Reset is done when the reset bit is low */
-               if (!(in_be32(&priv->dmatx->control) |
-                               in_be32(&priv->dmarx->control))
+               if ((!(in_be32(&priv->dmatx->control) |
+                               in_be32(&priv->dmarx->control)))
                                                & XAXIDMA_CR_RESET_MASK) {
                        break;
                }
@@ -589,7 +588,7 @@ static int axiemac_send(struct eth_device *dev, void *ptr, int len)
        /* Wait for transmission to complete */
        debug("axiemac: Waiting for tx to be done\n");
        timeout = 200;
-       while (timeout && (!in_be32(&priv->dmatx->status) &
+       while (timeout && ((!in_be32(&priv->dmatx->status)) &
                        (XAXIDMA_IRQ_DELAY_MASK | XAXIDMA_IRQ_IOC_MASK))) {
                timeout--;
                udelay(1);