Skip to content

Commit 00ef0ef

Browse files
saschahauerIngo Molnar
authored andcommitted
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 <[email protected]> Cc: FUJITA Tomonori <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent a4c3c04 commit 00ef0ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/sched/task_stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static inline void put_task_stack(struct task_struct *tsk) {}
7878
#define task_stack_end_corrupted(task) \
7979
(*(end_of_stack(task)) != STACK_END_MAGIC)
8080

81-
static inline int object_is_on_stack(void *obj)
81+
static inline int object_is_on_stack(const void *obj)
8282
{
8383
void *stack = task_stack_page(current);
8484

0 commit comments

Comments
 (0)