mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Li Zhong <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	zhong@linux.vnet.ibm.com, fweisbec@gmail.com,
	rostedt@goodmis.org, tglx@linutronix.de, khilman@linaro.org
Subject: [tip:sched/urgent] cputime: Constify timeval_to_cputime(timeval) argument
Date: Sun, 24 Feb 2013 04:21:48 -0800	[thread overview]
Message-ID: <tip-c78a4bcd1a879b39fb7646c887b0c195f1018909@git.kernel.org> (raw)
In-Reply-To: <1361636925-22288-2-git-send-email-fweisbec@gmail.com>

Commit-ID:  c78a4bcd1a879b39fb7646c887b0c195f1018909
Gitweb:     http://git.kernel.org/tip/c78a4bcd1a879b39fb7646c887b0c195f1018909
Author:     Li Zhong <zhong@linux.vnet.ibm.com>
AuthorDate: Sat, 23 Feb 2013 17:28:44 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 24 Feb 2013 12:57:15 +0100

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>
---
 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;

  reply	other threads:[~2013-02-24 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-23 16:28 [PATCH 0/2] cputime: Fixes Frederic Weisbecker
2013-02-23 16:28 ` [PATCH 1/2] cputime: fix compiler warning caused by timeval_to_cputime() Frederic Weisbecker
2013-02-24 12:21   ` tip-bot for Li Zhong [this message]
2013-02-23 16:28 ` [PATCH 2/2] cputime: Use local_clock() for full dynticks cputime accounting Frederic Weisbecker
2013-02-24 12:22   ` [tip:sched/urgent] " tip-bot for 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=tip-c78a4bcd1a879b39fb7646c887b0c195f1018909@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=khilman@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=zhong@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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

Powered by JetHome