summaryrefslogtreecommitdiffstats
path: root/drivers/net/xilinx_axi_emac.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-10-28 11:00:47 +0100
committerMichal Simek <michal.simek@xilinx.com>2016-01-27 15:55:50 +0100
commit3e3f8ba26e32191659fec2804cdba29d24cf9d6d (patch)
treedccddb2ec4936db4ee6a25043cd1f3d161648ee6 /drivers/net/xilinx_axi_emac.c
parent2014a3debc4c35069d6bda04bfe53539a7e2a6d4 (diff)
downloadtalos-obmc-uboot-3e3f8ba26e32191659fec2804cdba29d24cf9d6d.tar.gz
talos-obmc-uboot-3e3f8ba26e32191659fec2804cdba29d24cf9d6d.zip
net: axi_emac: Fix parentheses around operand !
Fix these compilation warning by proper grouping: In function 'axi_dma_init': drivers/net/xilinx_axi_emac.c:391:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] if (!(in_be32(&priv->dmatx->control) | ^ In function 'axiemac_send': drivers/net/xilinx_axi_emac.c:501:21: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] while (timeout && (!in_be32(&priv->dmatx->status) & Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/xilinx_axi_emac.c')
-rw-r--r--drivers/net/xilinx_axi_emac.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index df053feee8..994affa66f 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -388,9 +388,9 @@ 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) |
+ if (!((in_be32(&priv->dmatx->control) |
in_be32(&priv->dmarx->control))
- & XAXIDMA_CR_RESET_MASK) {
+ & XAXIDMA_CR_RESET_MASK)) {
break;
}
}
@@ -498,8 +498,8 @@ 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) &
- (XAXIDMA_IRQ_DELAY_MASK | XAXIDMA_IRQ_IOC_MASK))) {
+ while (timeout && (!(in_be32(&priv->dmatx->status) &
+ (XAXIDMA_IRQ_DELAY_MASK | XAXIDMA_IRQ_IOC_MASK)))) {
timeout--;
udelay(1);
}
OpenPOWER on IntegriCloud