From patchwork Thu Aug 4 21:14:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 9264349 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 467026048F for ; Thu, 4 Aug 2016 21:16:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3708828405 for ; Thu, 4 Aug 2016 21:16:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BEBA28411; Thu, 4 Aug 2016 21:16:18 +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 CAADE28405 for ; Thu, 4 Aug 2016 21:16:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966686AbcHDVOq (ORCPT ); Thu, 4 Aug 2016 17:14:46 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:33698 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966626AbcHDVOo (ORCPT ); Thu, 4 Aug 2016 17:14:44 -0400 Received: by mail-lf0-f42.google.com with SMTP id b199so190906245lfe.0 for ; Thu, 04 Aug 2016 14:14: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=VK8d6UeWO2F1EMoB9BSbm7ssiG7gilIZX8k0kTuwCRM=; b=FL3HJEIKVQPyKvsz+EqBBUPSpGisQQmLgpHd8nruf7AVU5Tn9VDR3l3et7Ve5gs/4w k4g3ZkPoOyEOk5qaB9MS6LfCeuqqo4qdCr5yStoU6hRiznSl0wvuY9c9zW1quQ9Xdh3h MXIWSRc8oIqAKsyi7FJwUUdQLEhFJZcAECABU= 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=VK8d6UeWO2F1EMoB9BSbm7ssiG7gilIZX8k0kTuwCRM=; b=X3vNdnhzRFoI/8olgOeKpd1lFG5Ds2s7GtH29s0ni2pwfmlsAJxPqEEdcLqYHSeKg+ nNQOGcgt3R8uDh3wM0iZmVAPzvCC20xcspiIy/LcQNDURkK+LZXLscaZ8Eh9xdVGOBGB 8hv2Ke2oab9DEC49hvKK/W+zs8R/0Lbnos5pO6jdXj55hjaGBePxTAdKRjsHnSnSa1P8 kltTS58u2dpcJKxpmCi1a8sDrnU5eLSbRU5qeK/+HzQ7Fc2ophnagv6ZbnHlMGE6Xfeo 4vv/84VnQSQ8NMGEyCr8WiL8X2Ld0dCoQn1D8Q6ApXUC7WaxQD5iVqIoGLm7MuGOeYwE z4Qw== X-Gm-Message-State: AEkoousBMBWaub8pUqf2KGv8WBDvSOZ5HAZ/SgM2/lgIrYISorNgu5uO51WFFADmWaoHF8j2 X-Received: by 10.25.215.145 with SMTP id q17mr24308857lfi.30.1470345282609; Thu, 04 Aug 2016 14:14:42 -0700 (PDT) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id g74sm2697427ljg.24.2016.08.04.14.14.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Aug 2016 14:14:41 -0700 (PDT) From: Ivan Khoronzhuk To: netdev@vger.kernel.org, mugunthanvnm@ti.com Cc: linux-omap@vger.kernel.org, grygorii.strashko@ti.com, linux-kernel@vger.kernel.org, Ivan Khoronzhuk Subject: [PATCH 2/3] net: ethernet: ti: cpsw: remove redundant check in napi poll Date: Fri, 5 Aug 2016 00:14:31 +0300 Message-Id: <1470345272-874-3-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470345272-874-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1470345272-874-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 rarely 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); 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; }