summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-12-25 12:30:41 +0100
committerThomas Gleixner <tglx@linutronix.de>2016-12-25 17:21:22 +0100
commit8b0e195314fabd58a331c4f7b6db75a1565535d7 (patch)
tree6ff9d2d9388406b8447b09b6a4037795142172de /drivers/base
parent2456e855354415bfaeb7badaa14e11b3e02c8466 (diff)
downloadop-kernel-dev-8b0e195314fabd58a331c4f7b6db75a1565535d7.zip
op-kernel-dev-8b0e195314fabd58a331c4f7b6db75a1565535d7.tar.gz
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 <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/main.c2
-rw-r--r--drivers/base/power/wakeup.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 48c6294..249e030 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 9433290..f546f8f 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",
OpenPOWER on IntegriCloud