git: 8a142484d4c1 - main - pps: Directly assign the timestamps in pps_event()

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 27 Feb 2023 22:12:21 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=8a142484d4c1d64b00a10e79fb4eb8b9f8d6c68d

commit 8a142484d4c1d64b00a10e79fb4eb8b9f8d6c68d
Author:     Sebastian Huber <sebastian.huber@embedded-brains.de>
AuthorDate: 2023-02-27 21:49:09 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-02-27 22:10:55 +0000

    pps: Directly assign the timestamps in pps_event()
    
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/604
---
 sys/kern/kern_tc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index b625726123af..be564e4347f8 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -1860,8 +1860,7 @@ pps_event(struct pps_state *pps, int event)
 	tcount = pps->capcount - tcount;
 	tcount &= captc->tc_counter_mask;
 	bintime_addx(&bt, capth_scale * tcount);
-	bintime2timespec(&bt, &ts);
-	*tsp = ts;
+	bintime2timespec(&bt, tsp);
 
 	if (foff) {
 		timespecadd(tsp, osp, tsp);
@@ -1876,9 +1875,8 @@ pps_event(struct pps_state *pps, int event)
 	bt = pps->capffth->tick_time;
 	ffclock_convert_delta(tcount, pps->capffth->cest.period, &bt);
 	bintime_add(&bt, &pps->capffth->tick_time);
-	bintime2timespec(&bt, &ts);
 	(*pseq_ffc)++;
-	*tsp_ffc = ts;
+	bintime2timespec(&bt, tsp_ffc);
 #endif
 
 #ifdef PPS_SYNC