summaryrefslogtreecommitdiff
path: root/include/linux/sched
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-12-05 11:44:15 +0100
committerIngo Molnar <mingo@kernel.org>2017-12-06 20:50:02 +0100
commit00ef0ef2cccb0350eae368e565c98453a9305b05 (patch)
tree54e1721b48b0358baf86b771a93f52c5071342db /include/linux/sched
parenta4c3c04974d648ee6e1a09ef4131eb32a02ab494 (diff)
sched/headers: Constify object_is_on_stack()
object_is_on_stack() doesn't modify its argument and should never do it. Make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: kernel@pengutronix.de Link: http://lkml.kernel.org/r/20171205104415.17147-1-s.hauer@pengutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched')
-rw-r--r--include/linux/sched/task_stack.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h
index cb4828aaa34f..6a841929073f 100644
--- a/include/linux/sched/task_stack.h
+++ b/include/linux/sched/task_stack.h
@@ -78,7 +78,7 @@ static inline void put_task_stack(struct task_struct *tsk) {}
#define task_stack_end_corrupted(task) \
(*(end_of_stack(task)) != STACK_END_MAGIC)
-static inline int object_is_on_stack(void *obj)
+static inline int object_is_on_stack(const void *obj)
{
void *stack = task_stack_page(current);