summaryrefslogtreecommitdiff
path: root/ipc/kdbus/metadata.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-04-10 13:43:37 +0200
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:48:45 +0900
commitb41252abc255f7e0eb605833f7bdf3496995fa84 (patch)
tree932fd116cbedf5ec1ca792ee92a8c1617478296e /ipc/kdbus/metadata.c
parent6914b0bc858a9e8bd72dbc04f8955c96413e37d9 (diff)
kdbus: avoid the use of struct timespec
I did a routine check for new users of 'timespec', which we are trying to remove from the kernel in order to survive y2038. kdbus came up and looks particularly trivial to clean up. This changes the three ktime_get_ts() variants used in kdbus to ktime_get_ns(), which aside from removing timespec also simplifies the code and makes it slightly more efficient by avoiding a two-way conversion. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
Diffstat (limited to 'ipc/kdbus/metadata.c')
-rw-r--r--ipc/kdbus/metadata.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ipc/kdbus/metadata.c b/ipc/kdbus/metadata.c
index 06e0a54a276a..3adc6c2c2e76 100644
--- a/ipc/kdbus/metadata.c
+++ b/ipc/kdbus/metadata.c
@@ -678,13 +678,8 @@ struct kdbus_meta_conn *kdbus_meta_conn_unref(struct kdbus_meta_conn *mc)
static void kdbus_meta_conn_collect_timestamp(struct kdbus_meta_conn *mc,
struct kdbus_kmsg *kmsg)
{
- struct timespec ts;
-
- ktime_get_ts(&ts);
- mc->ts.monotonic_ns = timespec_to_ns(&ts);
-
- ktime_get_real_ts(&ts);
- mc->ts.realtime_ns = timespec_to_ns(&ts);
+ mc->ts.monotonic_ns = ktime_get_ns();
+ mc->ts.realtime_ns = ktime_get_real_ns();
if (kmsg)
mc->ts.seqnum = kmsg->seq;