* [PATCH] sched/headers: make object_is_on_stack() argument const
@ 2017-12-05 10:44 Sascha Hauer
2017-12-06 20:31 ` [tip:sched/core] sched/headers: Constify object_is_on_stack() tip-bot for Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2017-12-05 10:44 UTC (permalink / raw)
To: linux-kernel; +Cc: kernel, Sascha Hauer, Ingo Molnar, FUJITA Tomonori
object_is_on_stack() doesn't modify its argument and should never have
to. Make it const.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
include/linux/sched/task_stack.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:sched/core] sched/headers: Constify object_is_on_stack()
2017-12-05 10:44 [PATCH] sched/headers: make object_is_on_stack() argument const Sascha Hauer
@ 2017-12-06 20:31 ` tip-bot for Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Sascha Hauer @ 2017-12-06 20:31 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, hpa, s.hauer, mingo, fujita.tomonori, peterz, torvalds,
linux-kernel
Commit-ID: 00ef0ef2cccb0350eae368e565c98453a9305b05
Gitweb: https://git.kernel.org/tip/00ef0ef2cccb0350eae368e565c98453a9305b05
Author: Sascha Hauer <s.hauer@pengutronix.de>
AuthorDate: Tue, 5 Dec 2017 11:44:15 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 6 Dec 2017 20:50:02 +0100
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>
---
include/linux/sched/task_stack.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h
index cb4828a..6a84192 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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-06 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-05 10:44 [PATCH] sched/headers: make object_is_on_stack() argument const Sascha Hauer
2017-12-06 20:31 ` [tip:sched/core] sched/headers: Constify object_is_on_stack() tip-bot for Sascha Hauer
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