hisilicon: add some missing curly braces
PATCH 1/1 hisilicon: add some missing curly braces
The if block was supposed to have curly braces. In the current code we complain about dropped rx packets when we shouldn't.
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/ethernet/hisilicon/hip04_eth.c +2 -1
@@ -567,10 +567,11 @@ static irqreturn_t hip04_mac_interrupt(int irq, void *dev_id)writel_relaxed (DEF_INT_MASK , priv->base +PPE_RINT );if (unlikely (ists &DEF_INT_ERR )) { -if (ists & (RCV_NOBUF |RCV_DROP )) +if (ists & (RCV_NOBUF |RCV_DROP )) { stats->rx_errors++; stats->rx_dropped++;netdev_err (ndev,"rx drop\n" ); + }if (ists &TX_DROP ) { stats->tx_dropped++;netdev_err (ndev,"tx drop\n" );
Quoted 5 lines · Dan Carpenter
The if block was supposed to have curly braces. In the current code we complain about dropped rx packets when we shouldn't.
Signed-off-by Dan Carpenter <[email protected]>
Acked-by Ding Tianhong <[email protected]>
Good catch. thanks;
Hi David, this patch looks good to me, and I was preparing a series patches for hip04, I could add this patch to the series or you could apply this alone as your wish.:)
Ding
Quoted 19 lines
drivers/net/ethernet/hisilicon/hip04_eth.c +2
-1@@ -567,10 +567,11 @@ static irqreturn_t hip04_mac_interrupt(int irq, void *dev_id)writel_relaxed (DEF_INT_MASK , priv->base +PPE_RINT );if (unlikely (ists &DEF_INT_ERR )) { -if (ists & (RCV_NOBUF |RCV_DROP )) +if (ists & (RCV_NOBUF |RCV_DROP )) { stats->rx_errors++; stats->rx_dropped++;netdev_err (ndev,"rx drop\n" ); + }if (ists &TX_DROP ) { stats->tx_dropped++;netdev_err (ndev,"tx drop\n" );
From: Ding Tianhong <[email protected]>
Date: Thu, 29 Jan 2015 10:50:35 +0800
Quoted 7 lines · Dan Carpenter
Quoted 5 lines
The if block was supposed to have curly braces. In the current code we complain about dropped rx packets when we shouldn't.
Signed-off-by Dan Carpenter <[email protected]>Acked-by Ding Tianhong <[email protected]>
Applied, thanks everyone.