diff options
author | Li Zhong <zhong@linux.vnet.ibm.com> | 2013-02-23 20:28:44 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-02-24 15:57:15 +0400 |
commit | c78a4bcd1a879b39fb7646c887b0c195f1018909 (patch) | |
tree | 79820d02a0a4d083fb0a9d7f940e44e3e748d761 /include/asm-generic/cputime_nsecs.h | |
parent | 45ebd3945b2a3cf4eb89d5fb0090a3cb71af7973 (diff) | |
download | linux-c78a4bcd1a879b39fb7646c887b0c195f1018909.tar.xz |
cputime: Constify timeval_to_cputime(timeval) argument
Saw the following compiler warning on the linux-next tree:
kernel/itimer.c: In function 'set_cpu_itimer':
kernel/itimer.c:152:2: warning: passing argument 1 of 'timeval_to_cputime' discards 'const' qualifier from pointer target type [enabled by default]
...
timeval_to_cputime() is always passed a constant timeval in
argument, we need to teach the nsecs based cputime
implementation about that.
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Kevin Hilman <khilman@linaro.org>
Link: http://lkml.kernel.org/r/1361636925-22288-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'include/asm-generic/cputime_nsecs.h')
-rw-r--r-- | include/asm-generic/cputime_nsecs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/cputime_nsecs.h b/include/asm-generic/cputime_nsecs.h index b6485cafb7bd..a8ece9a33aef 100644 --- a/include/asm-generic/cputime_nsecs.h +++ b/include/asm-generic/cputime_nsecs.h @@ -76,7 +76,7 @@ static inline void cputime_to_timespec(const cputime_t ct, struct timespec *val) /* * Convert cputime <-> timeval (msec) */ -static inline cputime_t timeval_to_cputime(struct timeval *val) +static inline cputime_t timeval_to_cputime(const struct timeval *val) { u64 ret = val->tv_sec * NSEC_PER_SEC + val->tv_usec * NSEC_PER_USEC; return (__force cputime_t) ret; |