From: Keith Owens Date: Tue, 11 Apr 2006 05:54:07 +0000 (-0700) Subject: [PATCH] Reinstate const in next_thread() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9cdf410ca8f59b52bc7061a6751050010c7cc5b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] Reinstate const in next_thread() Before commit 47e65328a7b1cdfc4e3102e50d60faf94ebba7d3, next_thread() took a const task_t. Reinstate the const qualifier, getting the next thread never changes the current thread. Signed-off-by: Keith Owens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/sched.h b/include/linux/sched.h index a3e4f6b503a..83d657811d0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1206,7 +1206,7 @@ extern void wait_task_inactive(task_t * p); /* de_thread depends on thread_group_leader not being a pid based check */ #define thread_group_leader(p) (p == p->group_leader) -static inline task_t *next_thread(task_t *p) +static inline task_t *next_thread(const task_t *p) { return list_entry(rcu_dereference(p->thread_group.next), task_t, thread_group);