Date: Wed, 14 Feb 2018 09:53:23 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r329260 - stable/11/sys/compat/linuxkpi/common/include/linux Message-ID: <201802140953.w1E9rNQx087407@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Wed Feb 14 09:53:23 2018 New Revision: 329260 URL: https://svnweb.freebsd.org/changeset/base/329260 Log: MFC r328971: 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 Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Feb 14 07:59:30 2018 (r329259) +++ stable/11/sys/compat/linuxkpi/common/include/linux/ktime.h Wed Feb 14 09:53:23 2018 (r329260) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802140953.w1E9rNQx087407>