All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch net-next] hisilicon: add some missing curly braces
@ 2015-01-28 18:58 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-01-28 18:58 UTC (permalink / raw)
  To: dingtianhong
  Cc: Zhangfei Gao, David S. Miller, Arnd Bergmann, netdev, kernel-janitors

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 <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index 525214e..c02b81b 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -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");

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [patch net-next] hisilicon: add some missing curly braces
@ 2015-01-28 18:58 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-01-28 18:58 UTC (permalink / raw)
  To: dingtianhong
  Cc: Zhangfei Gao, David S. Miller, Arnd Bergmann, netdev, kernel-janitors

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 <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index 525214e..c02b81b 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -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");

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [patch net-next] hisilicon: add some missing curly braces
  2015-01-28 18:58 ` Dan Carpenter
@ 2015-01-29  2:50   ` Ding Tianhong
  -1 siblings, 0 replies; 6+ messages in thread
From: Ding Tianhong @ 2015-01-29  2:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Zhangfei Gao, David S. Miller, Arnd Bergmann, netdev, kernel-janitors

On 2015/1/29 2:58, Dan Carpenter wrote:
> 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 <dan.carpenter@oracle.com>
> 
Acked-by: Ding Tianhong <dingtianhong@huawei.com>

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

> diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
> index 525214e..c02b81b 100644
> --- a/drivers/net/ethernet/hisilicon/hip04_eth.c
> +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
> @@ -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");
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch net-next] hisilicon: add some missing curly braces
@ 2015-01-29  2:50   ` Ding Tianhong
  0 siblings, 0 replies; 6+ messages in thread
From: Ding Tianhong @ 2015-01-29  2:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Zhangfei Gao, David S. Miller, Arnd Bergmann, netdev, kernel-janitors

On 2015/1/29 2:58, Dan Carpenter wrote:
> 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 <dan.carpenter@oracle.com>
> 
Acked-by: Ding Tianhong <dingtianhong@huawei.com>

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

> diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
> index 525214e..c02b81b 100644
> --- a/drivers/net/ethernet/hisilicon/hip04_eth.c
> +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
> @@ -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");
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch net-next] hisilicon: add some missing curly braces
  2015-01-29  2:50   ` Ding Tianhong
@ 2015-01-29  7:07     ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-01-29  7:07 UTC (permalink / raw)
  To: dingtianhong; +Cc: dan.carpenter, zhangfei.gao, arnd, netdev, kernel-janitors

From: Ding Tianhong <dingtianhong@huawei.com>
Date: Thu, 29 Jan 2015 10:50:35 +0800

> On 2015/1/29 2:58, Dan Carpenter wrote:
>> 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 <dan.carpenter@oracle.com>
>> 
> Acked-by: Ding Tianhong <dingtianhong@huawei.com>

Applied, thanks everyone.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch net-next] hisilicon: add some missing curly braces
@ 2015-01-29  7:07     ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-01-29  7:07 UTC (permalink / raw)
  To: dingtianhong; +Cc: dan.carpenter, zhangfei.gao, arnd, netdev, kernel-janitors

From: Ding Tianhong <dingtianhong@huawei.com>
Date: Thu, 29 Jan 2015 10:50:35 +0800

> On 2015/1/29 2:58, Dan Carpenter wrote:
>> 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 <dan.carpenter@oracle.com>
>> 
> Acked-by: Ding Tianhong <dingtianhong@huawei.com>

Applied, thanks everyone.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-29  7:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 18:58 [patch net-next] hisilicon: add some missing curly braces Dan Carpenter
2015-01-28 18:58 ` Dan Carpenter
2015-01-29  2:50 ` Ding Tianhong
2015-01-29  2:50   ` Ding Tianhong
2015-01-29  7:07   ` David Miller
2015-01-29  7:07     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.