From patchwork Sat Aug 6 10:48:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 9266103 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95B8C60760 for ; Sat, 6 Aug 2016 22:15:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BA1928414 for ; Sat, 6 Aug 2016 22:15:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7006C28418; Sat, 6 Aug 2016 22:15:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EABED28414 for ; Sat, 6 Aug 2016 22:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751724AbcHFWPo (ORCPT ); Sat, 6 Aug 2016 18:15:44 -0400 Received: from mail-lf0-f52.google.com ([209.85.215.52]:34076 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751530AbcHFWPn (ORCPT ); Sat, 6 Aug 2016 18:15:43 -0400 Received: by mail-lf0-f52.google.com with SMTP id l69so224815535lfg.1 for ; Sat, 06 Aug 2016 15:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wW/jNbF1ROHvGqyEq34mPcR+QzgRiTv3pDr4gnA+4iQ=; b=N4hGNg1rfoNlxdei90egzzdaBT96I+PcySWFdVtt5M05hrUpbG7l+uIPSjGpixG+l1 W2YtvECa5Gmtl3CYlzOBSBpt0r8f/XI/b5kSPoz4nzAbUd5e3uDlCTqLaPFzwvNqCiHx yzKdKJ2eZayslj1zXmRLoFionlV2y4iZ5AqX8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wW/jNbF1ROHvGqyEq34mPcR+QzgRiTv3pDr4gnA+4iQ=; b=XK5GwhzULFEbYNfJ8tTuGGTx9zBMe1iTiDTcvNo97xQke64qMlCH+Y7bXI8YTmrtPr SZLyE7qXxYj4tM6eFZJHjZNkIY2gEiyjGmfiau2ZUjwpRhzmZpfNEGELTUJXoYOSWn6k z7GkPX451N10wCMz+LVuv5PK5WQpOfKJhZyKsb0byvIww++8njCiXg0piLjaJbWebdOK jL1uP1y9Jq/WBuu0GKNIlOYHBuGbeygxj378F6POkD/x3EXr9QS90qOgK/qX25FL9mvA KylpXVUYAW+AGL1+AzEt1bJsJu2O3S4e9pJwkJfNV9NMMCd7YthdbL9EmgeiKAIcDa2k 4ELg== X-Gm-Message-State: AEkoouuvqXCdvVTPY8oLmmPQ1Arz1x5OYXkIOlQkD/TTDBS89K5+SutLySCjiE2q58QEQAWk X-Received: by 10.25.160.139 with SMTP id j133mr22188534lfe.227.1470480540504; Sat, 06 Aug 2016 03:49:00 -0700 (PDT) Received: from localhost.localdomain (153-224-132-95.pool.ukrtel.net. [95.132.224.153]) by smtp.gmail.com with ESMTPSA id p128sm3916360lfb.32.2016.08.06.03.48.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Aug 2016 03:49:00 -0700 (PDT) From: Ivan Khoronzhuk To: netdev@vger.kernel.org, mugunthanvnm@ti.com, grygorii.strashko@ti.com Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dlide@ti.com, Ivan Khoronzhuk Subject: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll Date: Sat, 6 Aug 2016 13:48:32 +0300 Message-Id: <1470480524-6851-3-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470480524-6851-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1470480524-6851-1-git-send-email-ivan.khoronzhuk@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Mugunthan V N --- 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); 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); return num_rx; }