From: Li Zhong <zhong@linux•vnet.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail•com>
Cc: linux-next list <linux-next@vger•kernel.org>
Subject: [PATCH linux-next]cputime: fix compiler warning caused by timeval_to_cputime()
Date: Sun, 17 Feb 2013 14:53:26 +0800 [thread overview]
Message-ID: <1361084006.2580.16.camel@ThinkPad-T5421.cn.ibm.com> (raw)
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
next reply other threads:[~2013-02-17 6:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-17 6:53 Li Zhong [this message]
2013-02-18 12:31 ` [PATCH linux-next]cputime: fix compiler warning caused by timeval_to_cputime() Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361084006.2580.16.camel@ThinkPad-T5421.cn.ibm.com \
--to=zhong@linux$(echo .)vnet.ibm.com \
--cc=fweisbec@gmail$(echo .)com \
--cc=linux-next@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox