Commit 1b48602e authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[PKT_SCHED]: Inline psched_tod_diff

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a15eb9d
...@@ -132,7 +132,18 @@ do { \ ...@@ -132,7 +132,18 @@ do { \
__delta; \ __delta; \
}) })
extern int psched_tod_diff(int delta_sec, int bound); static inline int
psched_tod_diff(int delta_sec, int bound)
{
int delta;
if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1)
return bound;
delta = delta_sec * 1000000;
if (delta > bound)
delta = bound;
return delta;
}
#define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \ #define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \
({ \ ({ \
......
...@@ -1172,21 +1172,6 @@ static struct file_operations psched_fops = { ...@@ -1172,21 +1172,6 @@ static struct file_operations psched_fops = {
}; };
#endif #endif
#ifdef CONFIG_NET_SCH_CLK_GETTIMEOFDAY
int psched_tod_diff(int delta_sec, int bound)
{
int delta;
if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1)
return bound;
delta = delta_sec * 1000000;
if (delta > bound)
delta = bound;
return delta;
}
EXPORT_SYMBOL(psched_tod_diff);
#endif
#ifdef CONFIG_NET_SCH_CLK_CPU #ifdef CONFIG_NET_SCH_CLK_CPU
psched_tdiff_t psched_clock_per_hz; psched_tdiff_t psched_clock_per_hz;
int psched_clock_scale; int psched_clock_scale;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment