From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932271AbcHILaE (ORCPT ); Tue, 9 Aug 2016 07:30:04 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:45726 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbcHILaB (ORCPT ); Tue, 9 Aug 2016 07:30:01 -0400 Subject: Re: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll To: Ivan Khoronzhuk , , References: <1470480524-6851-1-git-send-email-ivan.khoronzhuk@linaro.org> <1470480524-6851-3-git-send-email-ivan.khoronzhuk@linaro.org> CC: , , From: Grygorii Strashko Message-ID: Date: Tue, 9 Aug 2016 14:29:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1470480524-6851-3-git-send-email-ivan.khoronzhuk@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/06/2016 01:48 PM, Ivan Khoronzhuk wrote: > No need to check number of handled packets, when in most cases (> 99%) > it's not 0. It can be 0 only in rare cases, even in this case > it's not bad to print just 0. > > Signed-off-by: Ivan Khoronzhuk > --- > drivers/net/ethernet/ti/cpsw.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c > index 8972bf6..85ee9f5 100644 > --- a/drivers/net/ethernet/ti/cpsw.c > +++ b/drivers/net/ethernet/ti/cpsw.c > @@ -793,9 +793,7 @@ static int cpsw_tx_poll(struct napi_struct *napi_tx, int budget) > } > } > > - if (num_tx) > - cpsw_dbg(priv, intr, "poll %d tx pkts\n", num_tx); > - > + cpsw_dbg(priv, intr, "poll %d tx pkts\n", num_tx); I think, this dbg log can be just dropped as it seems not very useful. This also will allow to drop patch [PATCH v2 12/14] net: ethernet: ti: cpsw: fix int dbg message > return num_tx; > } > > @@ -814,9 +812,7 @@ static int cpsw_rx_poll(struct napi_struct *napi_rx, int budget) > } > } > > - if (num_rx) > - cpsw_dbg(priv, intr, "poll %d rx pkts\n", num_rx); > - > + cpsw_dbg(priv, intr, "poll %d rx pkts\n", num_rx); Same here. > return num_rx; > } > > -- regards, -grygorii From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Subject: Re: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll Date: Tue, 9 Aug 2016 14:29:58 +0300 Message-ID: References: <1470480524-6851-1-git-send-email-ivan.khoronzhuk@linaro.org> <1470480524-6851-3-git-send-email-ivan.khoronzhuk@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1470480524-6851-3-git-send-email-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org To: Ivan Khoronzhuk , netdev@vger.kernel.org, mugunthanvnm@ti.com Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dlide@ti.com List-Id: linux-omap@vger.kernel.org On 08/06/2016 01:48 PM, Ivan Khoronzhuk wrote: > No need to check number of handled packets, when in most cases (> 99%) > it's not 0. It can be 0 only in rare cases, even in this case > it's not bad to print just 0. > > Signed-off-by: Ivan Khoronzhuk > --- > drivers/net/ethernet/ti/cpsw.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c > index 8972bf6..85ee9f5 100644 > --- a/drivers/net/ethernet/ti/cpsw.c > +++ b/drivers/net/ethernet/ti/cpsw.c > @@ -793,9 +793,7 @@ static int cpsw_tx_poll(struct napi_struct *napi_tx, int budget) > } > } > > - if (num_tx) > - cpsw_dbg(priv, intr, "poll %d tx pkts\n", num_tx); > - > + cpsw_dbg(priv, intr, "poll %d tx pkts\n", num_tx); I think, this dbg log can be just dropped as it seems not very useful. This also will allow to drop patch [PATCH v2 12/14] net: ethernet: ti: cpsw: fix int dbg message > return num_tx; > } > > @@ -814,9 +812,7 @@ static int cpsw_rx_poll(struct napi_struct *napi_rx, int budget) > } > } > > - if (num_rx) > - cpsw_dbg(priv, intr, "poll %d rx pkts\n", num_rx); > - > + cpsw_dbg(priv, intr, "poll %d rx pkts\n", num_rx); Same here. > return num_rx; > } > > -- regards, -grygorii