Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
"A small set of fixes for time(keeping):

- Add a missing include to prevent compiler warnings.

- Make the VDSO implementation of clock_getres() POSIX compliant
again. A recent change dropped the NULL pointer guard which is
required as NULL is a valid pointer value for this function.

- Fix two function documentation typos"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
posix-cpu-timers: Fix two trivial comments
timers/sched_clock: Include local timekeeping.h for missing declarations
lib/vdso: Make clock_getres() POSIX compliant again

Changed files
+10 -7
kernel
lib
+3 -3
kernel/time/posix-cpu-timers.c
··· 266 266 /** 267 267 * thread_group_sample_cputime - Sample cputime for a given task 268 268 * @tsk: Task for which cputime needs to be started 269 - * @iimes: Storage for time samples 269 + * @samples: Storage for time samples 270 270 * 271 271 * Called from sys_getitimer() to calculate the expiry time of an active 272 272 * timer. That means group cputime accounting is already active. Called ··· 1038 1038 * member of @pct->bases[CLK].nextevt. False otherwise 1039 1039 */ 1040 1040 static inline bool 1041 - task_cputimers_expired(const u64 *sample, struct posix_cputimers *pct) 1041 + task_cputimers_expired(const u64 *samples, struct posix_cputimers *pct) 1042 1042 { 1043 1043 int i; 1044 1044 1045 1045 for (i = 0; i < CPUCLOCK_MAX; i++) { 1046 - if (sample[i] >= pct->bases[i].nextevt) 1046 + if (samples[i] >= pct->bases[i].nextevt) 1047 1047 return true; 1048 1048 } 1049 1049 return false;
+2
kernel/time/sched_clock.c
··· 17 17 #include <linux/seqlock.h> 18 18 #include <linux/bitops.h> 19 19 20 + #include "timekeeping.h" 21 + 20 22 /** 21 23 * struct clock_read_data - data required to read from sched_clock() 22 24 *
+5 -4
lib/vdso/gettimeofday.c
··· 214 214 return -1; 215 215 } 216 216 217 - res->tv_sec = 0; 218 - res->tv_nsec = ns; 219 - 217 + if (likely(res)) { 218 + res->tv_sec = 0; 219 + res->tv_nsec = ns; 220 + } 220 221 return 0; 221 222 } 222 223 ··· 246 245 ret = clock_getres_fallback(clock, &ts); 247 246 #endif 248 247 249 - if (likely(!ret)) { 248 + if (likely(!ret && res)) { 250 249 res->tv_sec = ts.tv_sec; 251 250 res->tv_nsec = ts.tv_nsec; 252 251 }