All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ding Tianhong <dingtianhong@huawei.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Arnd Bergmann <arnd@arndb.de>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch net-next] hisilicon: add some missing curly braces
Date: Thu, 29 Jan 2015 02:50:35 +0000	[thread overview]
Message-ID: <54C99FFB.2080207@huawei.com> (raw)
In-Reply-To: <20150128185833.GA10259@mwanda>

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");
> 
> 



WARNING: multiple messages have this Message-ID (diff)
From: Ding Tianhong <dingtianhong@huawei.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Arnd Bergmann <arnd@arndb.de>, <netdev@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: Re: [patch net-next] hisilicon: add some missing curly braces
Date: Thu, 29 Jan 2015 10:50:35 +0800	[thread overview]
Message-ID: <54C99FFB.2080207@huawei.com> (raw)
In-Reply-To: <20150128185833.GA10259@mwanda>

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");
> 
> 

  reply	other threads:[~2015-01-29  2:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-01-29  2:50   ` Ding Tianhong
2015-01-29  7:07   ` David Miller
2015-01-29  7:07     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C99FFB.2080207@huawei.com \
    --to=dingtianhong@huawei.com \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zhangfei.gao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.