public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH linux-next]cputime: fix compiler warning caused by timeval_to_cputime()
@ 2013-02-17  6:53 Li Zhong
  2013-02-18 12:31 ` Frederic Weisbecker
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zhong @ 2013-02-17  6:53 UTC (permalink / raw)
  To: Frederic Weisbecker; +Cc: linux-next list

Saw the following compiler warning on 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]
...

Signed-off-by: Li Zhong <zhong@linux•vnet.ibm.com>
---
 include/asm-generic/cputime_nsecs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/asm-generic/cputime_nsecs.h b/include/asm-generic/cputime_nsecs.h
index b6485ca..a8ece9a 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;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-18 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-17  6:53 [PATCH linux-next]cputime: fix compiler warning caused by timeval_to_cputime() Li Zhong
2013-02-18 12:31 ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox