* [PATCH net-next 0/2] net: mvneta: simple cleanups
@ 2014-01-14 23:45 Arnaud Ebalard
2014-01-14 23:45 ` [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups Arnaud Ebalard
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Arnaud Ebalard @ 2014-01-14 23:45 UTC (permalink / raw)
To: linux-arm-kernel
Those two patches are intended for net-next. They apply on top of
performance improvements patches from Willy for mvneta driver.
They provide some simple cleanups for unused variables, function
params or return values.
Arnaud Ebalard (2):
net: mvneta: mvneta_tx_done_gbe() cleanups
net: mvneta: make mvneta_txq_done() return void
drivers/net/ethernet/marvell/mvneta.c | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
--
1.8.5.2
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups 2014-01-14 23:45 [PATCH net-next 0/2] net: mvneta: simple cleanups Arnaud Ebalard @ 2014-01-14 23:45 ` Arnaud Ebalard 2014-01-15 8:56 ` Willy Tarreau 2014-01-14 23:46 ` [PATCH net-next 2/2] net: mvneta: make mvneta_txq_done() return void Arnaud Ebalard 2014-01-15 23:41 ` [PATCH net-next 0/2] net: mvneta: simple cleanups David Miller 2 siblings, 1 reply; 9+ messages in thread From: Arnaud Ebalard @ 2014-01-14 23:45 UTC (permalink / raw) To: linux-arm-kernel 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 <arno@natisbad.org> --- 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 <cause_tx_done> 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; } -- 1.8.5.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups 2014-01-14 23:45 ` [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups Arnaud Ebalard @ 2014-01-15 8:56 ` Willy Tarreau 0 siblings, 0 replies; 9+ messages in thread From: Willy Tarreau @ 2014-01-15 8:56 UTC (permalink / raw) To: linux-arm-kernel On Wed, Jan 15, 2014 at 12:45:49AM +0100, Arnaud Ebalard wrote: > > 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 <arno@natisbad.org> Reviewed-by: Willy Tarreau <w@1wt.eu> Willy ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 2/2] net: mvneta: make mvneta_txq_done() return void 2014-01-14 23:45 [PATCH net-next 0/2] net: mvneta: simple cleanups Arnaud Ebalard 2014-01-14 23:45 ` [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups Arnaud Ebalard @ 2014-01-14 23:46 ` Arnaud Ebalard 2014-01-15 8:56 ` Willy Tarreau 2014-01-15 23:41 ` [PATCH net-next 0/2] net: mvneta: simple cleanups David Miller 2 siblings, 1 reply; 9+ messages in thread From: Arnaud Ebalard @ 2014-01-14 23:46 UTC (permalink / raw) To: linux-arm-kernel The function return parameter is not used in mvneta_tx_done_gbe(), where the function is called. This patch makes the function return void. Signed-off-by: Arnaud Ebalard <arno@natisbad.org> --- drivers/net/ethernet/marvell/mvneta.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 8c5150124b5e..f418f4f20f94 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -1314,15 +1314,16 @@ static void mvneta_txq_bufs_free(struct mvneta_port *pp, } /* Handle end of transmission */ -static int mvneta_txq_done(struct mvneta_port *pp, +static void mvneta_txq_done(struct mvneta_port *pp, struct mvneta_tx_queue *txq) { struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id); int tx_done; tx_done = mvneta_txq_sent_desc_proc(pp, txq); - if (tx_done == 0) - return tx_done; + if (!tx_done) + return; + mvneta_txq_bufs_free(pp, txq, tx_done); txq->count -= tx_done; @@ -1331,8 +1332,6 @@ static int mvneta_txq_done(struct mvneta_port *pp, if (txq->size - txq->count >= MAX_SKB_FRAGS + 1) netif_tx_wake_queue(nq); } - - return tx_done; } static void *mvneta_frag_alloc(const struct mvneta_port *pp) -- 1.8.5.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 2/2] net: mvneta: make mvneta_txq_done() return void 2014-01-14 23:46 ` [PATCH net-next 2/2] net: mvneta: make mvneta_txq_done() return void Arnaud Ebalard @ 2014-01-15 8:56 ` Willy Tarreau 0 siblings, 0 replies; 9+ messages in thread From: Willy Tarreau @ 2014-01-15 8:56 UTC (permalink / raw) To: linux-arm-kernel On Wed, Jan 15, 2014 at 12:46:52AM +0100, Arnaud Ebalard wrote: > > The function return parameter is not used in mvneta_tx_done_gbe(), > where the function is called. This patch makes the function return > void. > > Signed-off-by: Arnaud Ebalard <arno@natisbad.org> Reviewed-by: Willy Tarreau <w@1wt.eu> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 0/2] net: mvneta: simple cleanups 2014-01-14 23:45 [PATCH net-next 0/2] net: mvneta: simple cleanups Arnaud Ebalard 2014-01-14 23:45 ` [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups Arnaud Ebalard 2014-01-14 23:46 ` [PATCH net-next 2/2] net: mvneta: make mvneta_txq_done() return void Arnaud Ebalard @ 2014-01-15 23:41 ` David Miller 2014-01-16 6:16 ` Willy Tarreau 2 siblings, 1 reply; 9+ messages in thread From: David Miller @ 2014-01-15 23:41 UTC (permalink / raw) To: linux-arm-kernel From: Arnaud Ebalard <arno@natisbad.org> Date: Wed, 15 Jan 2014 00:45:31 +0100 > > Those two patches are intended for net-next. They apply on top of > performance improvements patches from Willy for mvneta driver. > They provide some simple cleanups for unused variables, function > params or return values. > > Arnaud Ebalard (2): > net: mvneta: mvneta_tx_done_gbe() cleanups > net: mvneta: make mvneta_txq_done() return void These patches do not apply to net-next, please respin. Thanks. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 0/2] net: mvneta: simple cleanups 2014-01-15 23:41 ` [PATCH net-next 0/2] net: mvneta: simple cleanups David Miller @ 2014-01-16 6:16 ` Willy Tarreau 2014-01-16 6:54 ` David Miller 0 siblings, 1 reply; 9+ messages in thread From: Willy Tarreau @ 2014-01-16 6:16 UTC (permalink / raw) To: linux-arm-kernel Hi David, On Wed, Jan 15, 2014 at 03:41:22PM -0800, David Miller wrote: > From: Arnaud Ebalard <arno@natisbad.org> > Date: Wed, 15 Jan 2014 00:45:31 +0100 > > > > > Those two patches are intended for net-next. They apply on top of > > performance improvements patches from Willy for mvneta driver. > > They provide some simple cleanups for unused variables, function > > params or return values. > > > > Arnaud Ebalard (2): > > net: mvneta: mvneta_tx_done_gbe() cleanups > > net: mvneta: make mvneta_txq_done() return void > > These patches do not apply to net-next, please respin. They depend on the two series I sent, I verified that they apply well once these two series are applied to net-next. Would you prefer that we resend a complete series with all the patches at once ? Thanks, Willy ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 0/2] net: mvneta: simple cleanups 2014-01-16 6:16 ` Willy Tarreau @ 2014-01-16 6:54 ` David Miller 2014-01-16 7:14 ` Willy Tarreau 0 siblings, 1 reply; 9+ messages in thread From: David Miller @ 2014-01-16 6:54 UTC (permalink / raw) To: linux-arm-kernel From: Willy Tarreau <w@1wt.eu> Date: Thu, 16 Jan 2014 07:16:15 +0100 > Would you prefer that we resend a complete series with all the patches > at once ? That might, in fact, work much better. Thanks. ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 0/2] net: mvneta: simple cleanups 2014-01-16 6:54 ` David Miller @ 2014-01-16 7:14 ` Willy Tarreau 0 siblings, 0 replies; 9+ messages in thread From: Willy Tarreau @ 2014-01-16 7:14 UTC (permalink / raw) To: linux-arm-kernel On Wed, Jan 15, 2014 at 10:54:51PM -0800, David Miller wrote: > From: Willy Tarreau <w@1wt.eu> > Date: Thu, 16 Jan 2014 07:16:15 +0100 > > > Would you prefer that we resend a complete series with all the patches > > at once ? > > That might, in fact, work much better. OK I'm resending the whole series now. Thanks. Willy ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-16 7:14 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-14 23:45 [PATCH net-next 0/2] net: mvneta: simple cleanups Arnaud Ebalard 2014-01-14 23:45 ` [PATCH net-next 1/2] net: mvneta: mvneta_tx_done_gbe() cleanups Arnaud Ebalard 2014-01-15 8:56 ` Willy Tarreau 2014-01-14 23:46 ` [PATCH net-next 2/2] net: mvneta: make mvneta_txq_done() return void Arnaud Ebalard 2014-01-15 8:56 ` Willy Tarreau 2014-01-15 23:41 ` [PATCH net-next 0/2] net: mvneta: simple cleanups David Miller 2014-01-16 6:16 ` Willy Tarreau 2014-01-16 6:54 ` David Miller 2014-01-16 7:14 ` Willy Tarreau
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).