* [PATCH net-next] sfc: avoid division by zero
@ 2016-08-17 15:00 Edward Cree
2016-08-19 6:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Edward Cree @ 2016-08-17 15:00 UTC (permalink / raw)
To: linux-net-drivers, netdev, davem; +Cc: Bert Kenward
The division is already being done properly in efx_ef10_get_timer_config
which returns zero-on-success, unlike the old efx_ef10_get_sysclk_freq.
Fixes: d95e329a55ba ("sfc: get timer configuration from adapter")
Signed-off-by: Edward Cree <ecree@solarflare.com>
---
drivers/net/ethernet/sfc/ef10.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index b8c9f18..2a70b1a 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -646,7 +646,6 @@ static int efx_ef10_probe(struct efx_nic *efx)
rc = efx_ef10_get_timer_config(efx);
if (rc < 0)
goto fail5;
- efx->timer_quantum_ns = 1536000 / rc; /* 1536 cycles */
rc = efx_mcdi_mon_probe(efx);
if (rc && rc != -EPERM)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] sfc: avoid division by zero
2016-08-17 15:00 [PATCH net-next] sfc: avoid division by zero Edward Cree
@ 2016-08-19 6:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-08-19 6:28 UTC (permalink / raw)
To: ecree; +Cc: linux-net-drivers, netdev, bkenward
From: Edward Cree <ecree@solarflare.com>
Date: Wed, 17 Aug 2016 16:00:10 +0100
> The division is already being done properly in efx_ef10_get_timer_config
> which returns zero-on-success, unlike the old efx_ef10_get_sysclk_freq.
>
> Fixes: d95e329a55ba ("sfc: get timer configuration from adapter")
> Signed-off-by: Edward Cree <ecree@solarflare.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-19 6:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17 15:00 [PATCH net-next] sfc: avoid division by zero Edward Cree
2016-08-19 6:28 ` David Miller
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).