]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: fix up 32 bit timespec references
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Tue, 20 Jun 2017 22:16:56 +0000 (15:16 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:24 +0000 (14:15 -0700)
As it turns out there was only a small set of errors
on 32 bit, and we just needed to be using the right calls
for dealing with timespec64 variables.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785018
(cherry picked from commit 0ac30ce433232944e702876c1288c0d50eee3151)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_ptp.c

index b6f14b5d21d95ee2a6dfd015ec9be71ddb5507c4..da05752be17e844e40c35b2691485b9252838397 100644 (file)
@@ -158,13 +158,12 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
 static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
 {
        struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
-       struct timespec64 now, then;
+       struct timespec64 now;
 
-       then = ns_to_timespec64(delta);
        mutex_lock(&pf->tmreg_lock);
 
        i40e_ptp_read(pf, &now);
-       now = timespec64_add(now, then);
+       timespec64_add_ns(&now, delta);
        i40e_ptp_write(pf, (const struct timespec64 *)&now);
 
        mutex_unlock(&pf->tmreg_lock);