* [PATCH] net: mvneta: remove duplicate *_coal assignment
@ 2018-03-29 9:29 ` Jisheng Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Jisheng Zhang @ 2018-03-29 9:29 UTC (permalink / raw)
To: Thomas Petazzoni, David Miller; +Cc: netdev, linux-kernel, linux-arm-kernel
The style of the rx/tx queue's *_coal member assignment is:
static void foo_coal_set(...)
{
set the coal in hw;
update queue's foo_coal member; [1]
}
In other place, we call foo_coal_set(pp, queue->foo_coal), so the above [1]
is duplicated and could be removed.
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
drivers/net/ethernet/marvell/mvneta.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index eaa4bb80f1c9..30aab9bf77cc 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1555,7 +1555,6 @@ static void mvneta_rx_pkts_coal_set(struct mvneta_port *pp,
{
mvreg_write(pp, MVNETA_RXQ_THRESHOLD_REG(rxq->id),
value | MVNETA_RXQ_NON_OCCUPIED(0));
- rxq->pkts_coal = value;
}
/* Set the time delay in usec before RX interrupt will be generated by
@@ -1571,7 +1570,6 @@ static void mvneta_rx_time_coal_set(struct mvneta_port *pp,
val = (clk_rate / 1000000) * value;
mvreg_write(pp, MVNETA_RXQ_TIME_COAL_REG(rxq->id), val);
- rxq->time_coal = value;
}
/* Set threshold for TX_DONE pkts coalescing */
@@ -1586,8 +1584,6 @@ static void mvneta_tx_done_pkts_coal_set(struct mvneta_port *pp,
val |= MVNETA_TXQ_SENT_THRESH_MASK(value);
mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), val);
-
- txq->done_pkts_coal = value;
}
/* Handle rx descriptor fill by setting buf_cookie and buf_phys_addr */
--
2.16.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] net: mvneta: remove duplicate *_coal assignment
@ 2018-03-29 9:29 ` Jisheng Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Jisheng Zhang @ 2018-03-29 9:29 UTC (permalink / raw)
To: linux-arm-kernel
The style of the rx/tx queue's *_coal member assignment is:
static void foo_coal_set(...)
{
set the coal in hw;
update queue's foo_coal member; [1]
}
In other place, we call foo_coal_set(pp, queue->foo_coal), so the above [1]
is duplicated and could be removed.
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
drivers/net/ethernet/marvell/mvneta.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index eaa4bb80f1c9..30aab9bf77cc 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1555,7 +1555,6 @@ static void mvneta_rx_pkts_coal_set(struct mvneta_port *pp,
{
mvreg_write(pp, MVNETA_RXQ_THRESHOLD_REG(rxq->id),
value | MVNETA_RXQ_NON_OCCUPIED(0));
- rxq->pkts_coal = value;
}
/* Set the time delay in usec before RX interrupt will be generated by
@@ -1571,7 +1570,6 @@ static void mvneta_rx_time_coal_set(struct mvneta_port *pp,
val = (clk_rate / 1000000) * value;
mvreg_write(pp, MVNETA_RXQ_TIME_COAL_REG(rxq->id), val);
- rxq->time_coal = value;
}
/* Set threshold for TX_DONE pkts coalescing */
@@ -1586,8 +1584,6 @@ static void mvneta_tx_done_pkts_coal_set(struct mvneta_port *pp,
val |= MVNETA_TXQ_SENT_THRESH_MASK(value);
mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), val);
-
- txq->done_pkts_coal = value;
}
/* Handle rx descriptor fill by setting buf_cookie and buf_phys_addr */
--
2.16.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: mvneta: remove duplicate *_coal assignment
2018-03-29 9:29 ` Jisheng Zhang
@ 2018-03-30 16:28 ` David Miller
-1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-03-30 16:28 UTC (permalink / raw)
To: Jisheng.Zhang; +Cc: thomas.petazzoni, netdev, linux-kernel, linux-arm-kernel
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Date: Thu, 29 Mar 2018 17:29:40 +0800
> The style of the rx/tx queue's *_coal member assignment is:
>
> static void foo_coal_set(...)
> {
> set the coal in hw;
> update queue's foo_coal member; [1]
> }
>
> In other place, we call foo_coal_set(pp, queue->foo_coal), so the above [1]
> is duplicated and could be removed.
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Applied.
We could make this convention even more explicit by not passing
the coalescing parameter into these helpers, but instead using
the value in rxq->foo and txq->foo.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] net: mvneta: remove duplicate *_coal assignment
@ 2018-03-30 16:28 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-03-30 16:28 UTC (permalink / raw)
To: linux-arm-kernel
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Date: Thu, 29 Mar 2018 17:29:40 +0800
> The style of the rx/tx queue's *_coal member assignment is:
>
> static void foo_coal_set(...)
> {
> set the coal in hw;
> update queue's foo_coal member; [1]
> }
>
> In other place, we call foo_coal_set(pp, queue->foo_coal), so the above [1]
> is duplicated and could be removed.
>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Applied.
We could make this convention even more explicit by not passing
the coalescing parameter into these helpers, but instead using
the value in rxq->foo and txq->foo.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-30 16:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 9:29 [PATCH] net: mvneta: remove duplicate *_coal assignment Jisheng Zhang
2018-03-29 9:29 ` Jisheng Zhang
2018-03-30 16:28 ` David Miller
2018-03-30 16:28 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.