Skip to content

Commit 272705c

Browse files
Roman ZippelLinus Torvalds
authored andcommitted
[PATCH] hrtimers: remove DEFINE_KTIME and ktime_to_clock_t()
Now that it_real_value is gone, the last user of DEFINE_KTIME and ktime_to_clock_t are also gone, so remove it before someone starts using it again. Signed-off-by: Roman Zippel <[email protected]> Acked-by: Ingo Molnar <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 4dee26b commit 272705c

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

include/linux/ktime.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ typedef union {
6464

6565
#if (BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)
6666

67-
/* Define a ktime_t variable and initialize it to zero: */
68-
#define DEFINE_KTIME(kt) ktime_t kt = { .tv64 = 0 }
69-
7067
/**
7168
* ktime_set - Set a ktime_t variable from a seconds/nanoseconds value
7269
*
@@ -113,9 +110,6 @@ static inline ktime_t timeval_to_ktime(struct timeval tv)
113110
/* Map the ktime_t to timeval conversion to ns_to_timeval function */
114111
#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64)
115112

116-
/* Map the ktime_t to clock_t conversion to the inline in jiffies.h: */
117-
#define ktime_to_clock_t(kt) nsec_to_clock_t((kt).tv64)
118-
119113
/* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */
120114
#define ktime_to_ns(kt) ((kt).tv64)
121115

@@ -136,9 +130,6 @@ static inline ktime_t timeval_to_ktime(struct timeval tv)
136130
* tv.sec < 0 and 0 >= tv.nsec < NSEC_PER_SEC
137131
*/
138132

139-
/* Define a ktime_t variable and initialize it to zero: */
140-
#define DEFINE_KTIME(kt) ktime_t kt = { .tv64 = 0 }
141-
142133
/* Set a ktime_t variable to a value in sec/nsec representation: */
143134
static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
144135
{
@@ -254,17 +245,6 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
254245
.tv_usec = (suseconds_t) (kt.tv.nsec / NSEC_PER_USEC) };
255246
}
256247

257-
/**
258-
* ktime_to_clock_t - convert a ktime_t variable to clock_t format
259-
* @kt: the ktime_t variable to convert
260-
*
261-
* Returns a clock_t variable with the converted value
262-
*/
263-
static inline clock_t ktime_to_clock_t(const ktime_t kt)
264-
{
265-
return nsec_to_clock_t( (u64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec);
266-
}
267-
268248
/**
269249
* ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
270250
* @kt: the ktime_t variable to convert

0 commit comments

Comments
 (0)