From patchwork Tue Jan 14 23:45:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 310901 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 4EB8F2C0091 for ; Wed, 15 Jan 2014 10:46:07 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbaANXqF (ORCPT ); Tue, 14 Jan 2014 18:46:05 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:44410 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752407AbaANXqB (ORCPT ); Tue, 14 Jan 2014 18:46:01 -0500 Received: from smtp.natisbad.org (unknown [81.57.185.249]) by smtp1-g21.free.fr (Postfix) with ESMTP id 3846B940091 for ; Wed, 15 Jan 2014 00:45:53 +0100 (CET) Received: by smtp.natisbad.org (Postfix, from userid 5001) id D2CF02C0D65; Wed, 15 Jan 2014 00:45:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1389743151; bh=287jIw2Ik6Ox/ND2aVLqcAMUg/iyZnpqt5tPGCi4UC4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=mac+FjQHdCoRK7a8RcZc4dqnjhY4mzTkyI85lBiaXEArICnvonYwKdapMLOVHmsdJ fzic9fesun0oJBHxKN5rVk7I3+gqORk/Bm0shCEKL+5fnG4cdewZOuzLhlxVzq+WOW eUnHumc+HrZ1Tu1ky5AWncHB23NnvKaYrcZ8LnPc= X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on petit X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from small (localhost [127.0.0.1]) by smtp.natisbad.org (Postfix) with ESMTP id 7A7102C07F4; Wed, 15 Jan 2014 00:45:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1389743149; bh=287jIw2Ik6Ox/ND2aVLqcAMUg/iyZnpqt5tPGCi4UC4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=eW1B3T14O9bQPl6PFTgJ6dVo3bdAvpiboyoLzIc5ZCuZK7nDvSl/AyR/W2e8mS+12 58vz9OOGApsnLvcC5sueeFgXnK+jV5T2///9dtXlhZo+v3NJfjJ+DwPhqYY2rrl8MP dirvCVLq+IPnaR4zLs4kTMhj+BN7yqbsIWy4lFiU= X-Hashcash: 1:20:140114:davem@davemloft.net::ezQJMx7MMgkWmk04:00000000000000000000000000000000000000000003w3 X-Hashcash: 1:20:140114:w@1wt.eu::8qpko1YIf6trgORN:00000000013P4 X-Hashcash: 1:20:140114:thomas.petazzoni@free-electrons.com::RGr2Va9IQlI8hyDD:000000000000000000000000001OfP X-Hashcash: 1:20:140114:netdev@vger.kernel.org::PJeQTAvKRb215cdP:000000000000000000000000000000000000000LTb2 X-Hashcash: 1:20:140114:linux-arm-kernel@lists.infradead.org::O4pMYoqMV5kn88vE:00000000000000000000000000gZ+ From: Arnaud Ebalard To: David Miller , Willy Tarreau , Thomas Petazzoni Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups In-Reply-To: References: Message-Id: <5880b38afc5884f5ed57c26824cc37666bd60b99.1389742334.git.arno@natisbad.org> Date: Wed, 15 Jan 2014 00:45:49 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org mvneta_tx_done_gbe() return value and third parameter are no more used. This patch changes the function prototype and removes a useless variable where the function is called. Signed-off-by: Arnaud Ebalard Reviewed-by: Willy Tarreau --- drivers/net/ethernet/marvell/mvneta.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index f5fc7a249880..8c5150124b5e 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -1704,30 +1704,23 @@ static void mvneta_txq_done_force(struct mvneta_port *pp, /* Handle tx done - called in softirq context. The argument * must be a valid cause according to MVNETA_TXQ_INTR_MASK_ALL. */ -static u32 mvneta_tx_done_gbe(struct mvneta_port *pp, u32 cause_tx_done, - int *tx_todo) +static void mvneta_tx_done_gbe(struct mvneta_port *pp, u32 cause_tx_done) { struct mvneta_tx_queue *txq; - u32 tx_done = 0; struct netdev_queue *nq; - *tx_todo = 0; while (cause_tx_done) { txq = mvneta_tx_done_policy(pp, cause_tx_done); nq = netdev_get_tx_queue(pp->dev, txq->id); __netif_tx_lock(nq, smp_processor_id()); - if (txq->count) { - tx_done += mvneta_txq_done(pp, txq); - *tx_todo += txq->count; - } + if (txq->count) + mvneta_txq_done(pp, txq); __netif_tx_unlock(nq); cause_tx_done &= ~((1 << txq->id)); } - - return tx_done; } /* Compute crc8 of the specified address, using a unique algorithm , @@ -1961,9 +1954,7 @@ static int mvneta_poll(struct napi_struct *napi, int budget) /* Release Tx descriptors */ if (cause_rx_tx & MVNETA_TX_INTR_MASK_ALL) { - int tx_todo = 0; - - mvneta_tx_done_gbe(pp, (cause_rx_tx & MVNETA_TX_INTR_MASK_ALL), &tx_todo); + mvneta_tx_done_gbe(pp, (cause_rx_tx & MVNETA_TX_INTR_MASK_ALL)); cause_rx_tx &= ~MVNETA_TX_INTR_MASK_ALL; }