aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorLaurence Evans <levans@solarflare.com>2013-11-21 05:38:24 -0500
committerBen Hutchings <bhutchings@solarflare.com>2013-12-12 17:07:07 -0500
commit94cd60d09eba9e8de0522d416d867fb16858fccd (patch)
tree49337a6e1b1733580241c42886f2788f58e91a0d /drivers/net/ethernet/sfc
parentbc0f3c1392ddfb6342fb22438faf23d09760e4c8 (diff)
sfc: PTP - tidy up unused/useless variables
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/ptp.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
index be7ed4e1c96c..82d8e27e8a58 100644
--- a/drivers/net/ethernet/sfc/ptp.c
+++ b/drivers/net/ethernet/sfc/ptp.c
@@ -237,9 +237,6 @@ struct efx_ptp_timeset {
237 * @evt_code: Last event code 237 * @evt_code: Last event code
238 * @start: Address at which MC indicates ready for synchronisation 238 * @start: Address at which MC indicates ready for synchronisation
239 * @host_time_pps: Host time at last PPS 239 * @host_time_pps: Host time at last PPS
240 * @last_sync_ns: Last number of nanoseconds between readings when synchronising
241 * @base_sync_ns: Number of nanoseconds for last synchronisation.
242 * @base_sync_valid: Whether base_sync_time is valid.
243 * @current_adjfreq: Current ppb adjustment. 240 * @current_adjfreq: Current ppb adjustment.
244 * @phc_clock: Pointer to registered phc device 241 * @phc_clock: Pointer to registered phc device
245 * @phc_clock_info: Registration structure for phc device 242 * @phc_clock_info: Registration structure for phc device
@@ -274,9 +271,6 @@ struct efx_ptp_data {
274 int evt_code; 271 int evt_code;
275 struct efx_buffer start; 272 struct efx_buffer start;
276 struct pps_event_time host_time_pps; 273 struct pps_event_time host_time_pps;
277 unsigned last_sync_ns;
278 unsigned base_sync_ns;
279 bool base_sync_valid;
280 s64 current_adjfreq; 274 s64 current_adjfreq;
281 struct ptp_clock *phc_clock; 275 struct ptp_clock *phc_clock;
282 struct ptp_clock_info phc_clock_info; 276 struct ptp_clock_info phc_clock_info;
@@ -482,18 +476,10 @@ efx_ptp_process_times(struct efx_nic *efx, MCDI_DECLARE_STRUCT_PTR(synch_buf),
482 476
483 if (ngood == 0) { 477 if (ngood == 0) {
484 netif_warn(efx, drv, efx->net_dev, 478 netif_warn(efx, drv, efx->net_dev,
485 "PTP no suitable synchronisations %dns\n", 479 "PTP no suitable synchronisations\n");
486 ptp->base_sync_ns);
487 return -EAGAIN; 480 return -EAGAIN;
488 } 481 }
489 482
490 /* Average minimum this synchronisation */
491 ptp->last_sync_ns = DIV_ROUND_UP(total, ngood);
492 if (!ptp->base_sync_valid || (ptp->last_sync_ns < ptp->base_sync_ns)) {
493 ptp->base_sync_valid = true;
494 ptp->base_sync_ns = ptp->last_sync_ns;
495 }
496
497 /* Calculate delay from actual PPS to last_time */ 483 /* Calculate delay from actual PPS to last_time */
498 delta.tv_nsec = 484 delta.tv_nsec =
499 ptp->timeset[last_good].nanoseconds + 485 ptp->timeset[last_good].nanoseconds +