Author: hselasky
Date: Wed Feb 7 12:12:06 2018
New Revision: 328971
URL: https://svnweb.freebsd.org/changeset/base/328971
Log:
Fix implementation of ktime_add_ns() and ktime_sub_ns() in the LinuxKPI to
actually return the computed result instead of the input value.
This is a regression issue after r289572.
Found by: gcc6
MFC after: 3 days
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/linux/ktime.h
Modified: head/sys/compat/linuxkpi/common/include/linux/ktime.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Feb 7
09:37:22 2018 (r328970)
+++ head/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Feb 7
12:12:06 2018 (r328971)
@@ -88,18 +88,14 @@ ktime_to_timeval(ktime_t kt)
static inline ktime_t
ktime_add_ns(ktime_t kt, int64_t ns)
{
- ktime_t res;
-
- res.tv64 = kt.tv64 + ns;
+ kt.tv64 += ns;
return kt;
}
static inline ktime_t
ktime_sub_ns(ktime_t kt, int64_t ns)
{
- ktime_t res;
-
- res.tv64 = kt.tv64 - ns;
+ kt.tv64 -= ns;
return kt;
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"