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: 3488931 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 278629F169 for ; Tue, 14 Jan 2014 23:47:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5D41F2021B for ; Tue, 14 Jan 2014 23:47:01 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50965201F7 for ; Tue, 14 Jan 2014 23:47:00 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3Dgn-0000m8-0w; Tue, 14 Jan 2014 23:46:33 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3Dgc-0004ac-9t; Tue, 14 Jan 2014 23:46:22 +0000 Received: from [2a01:e35:139b:9f90:221:70ff:fe55:8f78] (helo=smtp.natisbad.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3DgZ-0004Yz-In for linux-arm-kernel@lists.infradead.org; Tue, 14 Jan 2014 23:46:20 +0000 Received: by smtp.natisbad.org (Postfix, from userid 5001) id 1C5B22C0D79; Wed, 15 Jan 2014 00:45:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1389743156; bh=287jIw2Ik6Ox/ND2aVLqcAMUg/iyZnpqt5tPGCi4UC4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=AIow7WQzFGVX+1T404pWWkYSx6JoHWxBU+8JjmwJ9W7DLQgi7/hHbriC2Zd7t/SSG cHrArPjlZI/M2d4Qnh7jKRPJu6qS6pLosneCaISrhfFkDQcdQQo6ZyzgUmn2si675o QsW9zlf3fI1Rx98BFBcEBimuMStcIqVtIyF7lx88= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140114_184619_973690_B5FF7726 X-CRM114-Status: GOOD ( 13.12 ) X-Spam-Score: -1.2 (-) Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }