From 8b0e195314fabd58a331c4f7b6db75a1565535d7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 25 Dec 2016 12:30:41 +0100 Subject: ktime: Cleanup ktime_set() usage ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra --- drivers/base/power/main.c | 2 +- drivers/base/power/wakeup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/base') diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 48c6294e9c34..249e0304597f 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -194,7 +194,7 @@ void device_pm_move_last(struct device *dev) static ktime_t initcall_debug_start(struct device *dev) { - ktime_t calltime = ktime_set(0, 0); + ktime_t calltime = 0; if (pm_print_times_enabled) { pr_info("calling %s+ @ %i, parent: %s\n", diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 94332902a1cf..f546f8f107b0 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -1005,7 +1005,7 @@ static int print_wakeup_source_stats(struct seq_file *m, prevent_sleep_time = ktime_add(prevent_sleep_time, ktime_sub(now, ws->start_prevent_time)); } else { - active_time = ktime_set(0, 0); + active_time = 0; } seq_printf(m, "%-12s\t%lu\t\t%lu\t\t%lu\t\t%lu\t\t%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n", -- cgit v1.2.3