* [PATCH net-next] gianfar: remove unnecessary zeroing coalesce settings
@ 2020-03-04 2:26 Jakub Kicinski
2020-03-04 3:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2020-03-04 2:26 UTC (permalink / raw)
To: davem; +Cc: claudiu.manoil, netdev, Jakub Kicinski
Core already zeroes out the struct ethtool_coalesce structure,
drivers don't have to set every field to 0 individually.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
.../net/ethernet/freescale/gianfar_ethtool.c | 29 -------------------
1 file changed, 29 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 3c8e4e2efc07..5fc8bc5e25c5 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -276,35 +276,6 @@ static int gfar_gcoalesce(struct net_device *dev,
cvals->tx_coalesce_usecs = gfar_ticks2usecs(priv, txtime);
cvals->tx_max_coalesced_frames = txcount;
- cvals->use_adaptive_rx_coalesce = 0;
- cvals->use_adaptive_tx_coalesce = 0;
-
- cvals->pkt_rate_low = 0;
- cvals->rx_coalesce_usecs_low = 0;
- cvals->rx_max_coalesced_frames_low = 0;
- cvals->tx_coalesce_usecs_low = 0;
- cvals->tx_max_coalesced_frames_low = 0;
-
- /* When the packet rate is below pkt_rate_high but above
- * pkt_rate_low (both measured in packets per second) the
- * normal {rx,tx}_* coalescing parameters are used.
- */
-
- /* When the packet rate is (measured in packets per second)
- * is above pkt_rate_high, the {rx,tx}_*_high parameters are
- * used.
- */
- cvals->pkt_rate_high = 0;
- cvals->rx_coalesce_usecs_high = 0;
- cvals->rx_max_coalesced_frames_high = 0;
- cvals->tx_coalesce_usecs_high = 0;
- cvals->tx_max_coalesced_frames_high = 0;
-
- /* How often to do adaptive coalescing packet rate sampling,
- * measured in seconds. Must not be zero.
- */
- cvals->rate_sample_interval = 0;
-
return 0;
}
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] gianfar: remove unnecessary zeroing coalesce settings
2020-03-04 2:26 [PATCH net-next] gianfar: remove unnecessary zeroing coalesce settings Jakub Kicinski
@ 2020-03-04 3:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-04 3:22 UTC (permalink / raw)
To: kuba; +Cc: claudiu.manoil, netdev
From: Jakub Kicinski <kuba@kernel.org>
Date: Tue, 3 Mar 2020 18:26:12 -0800
> Core already zeroes out the struct ethtool_coalesce structure,
> drivers don't have to set every field to 0 individually.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Looks good, applied, thanks Jakub.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-04 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 2:26 [PATCH net-next] gianfar: remove unnecessary zeroing coalesce settings Jakub Kicinski
2020-03-04 3:22 ` 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.