ktime.h: move ktime_t to types.h
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 11 Dec 2023 19:11:05 +0000 (14:11 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 21 Dec 2023 00:26:30 +0000 (19:26 -0500)
ktime.h pulls in quite a few headers recursively (including printk.h) -
this is going to help with trimming sched.h dependencies.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
include/linux/ktime.h
include/linux/types.h

index 73f20deb497d5a86f58b3823615e2b0cd7920201..3a4e723eae0f1203d5aec7bb2d460dfbf171b644 100644 (file)
 #ifndef _LINUX_KTIME_H
 #define _LINUX_KTIME_H
 
-#include <linux/time.h>
-#include <linux/jiffies.h>
 #include <asm/bug.h>
-
-/* Nanosecond scalar representation for kernel time values */
-typedef s64    ktime_t;
+#include <linux/jiffies.h>
+#include <linux/time.h>
+#include <linux/types.h>
 
 /**
  * ktime_set - Set a ktime_t variable from a seconds/nanoseconds value
index 253168bb3fe15cdd6b4e4c8a0af091004369cc5b..2bc8766ba20cab014a380f02e5644bd0d772ec67 100644 (file)
@@ -120,6 +120,9 @@ typedef s64                 int64_t;
 #define aligned_be64           __aligned_be64
 #define aligned_le64           __aligned_le64
 
+/* Nanosecond scalar representation for kernel time values */
+typedef s64    ktime_t;
+
 /**
  * The type used for indexing onto a disc or disc partition.
  *