hrtimer: fix compile failure for when HRT are disabled
PATCH 1/1 hrtimer: fix compile failure for when HRT are disabled
With "# CONFIG_HIGH_RES_TIMERS is not set" in .config, one will see:
kernel/hrtimer.c: In function ‘__hrtimer_start_range_ns’:kernel/hrtimer.c:1045:7: error: implicit declaration of function ‘hrtimer_rt_defer’ [-Werror=implicit-function-declaration] kernel/hrtimer.c: At top level:kernel/hrtimer.c:1416:12: error: static declaration of ‘hrtimer_rt_defer’ follows non-static declaration kernel/hrtimer.c:1045:10: note: previous implicit declaration of ‘hrtimer_rt_defer’ was here
cc1: some warnings being treated as errors
make[2]: *** [kernel/hrtimer.o] Error 1
Move the prototype outside of the block of code which is conditional on high res timers.
---
[Not needed for 3.6-rt; 3.0-rt and 3.2-rt were not tested for this issue.]
kernel/hrtimer.c +2 -1
@@ -625,7 +625,6 @@ static int hrtimer_reprogram(struct hrtimer *timer, }static void __run_hrtimer (struct hrtimer *timer,ktime_t *now); -static int hrtimer_rt_defer (struct hrtimer *timer);/* * Initialize the high resolution related parts of cpu_base
@@ -740,6 +739,8 @@ static inline int hrtimer_reprogram(struct hrtimer *timer,#endif /* CONFIG_HIGH_RES_TIMERS */ +static int hrtimer_rt_defer (struct hrtimer *timer); +/* * Clock realtime was set *
Signature · 6 lines
1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html