From: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Date: Tue, 20 Dec 2011 16:20:46 +0000 (-0800)
Subject: sched: Add "const" to is_idle_task() parameter
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7061ca3b6c99fc78115560b9a10227c8c5fafc45;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git

sched: Add "const" to is_idle_task() parameter

This patch fixes a build warning in -next due to a const pointer being
passed to is_idle_task().  Because is_idle_task() does not modify anything,
this commit adds the "const" to is_idle_task()'s argument declaration.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4a7e4d333a2..56fa25a5b1e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2074,7 +2074,7 @@ extern struct task_struct *idle_task(int cpu);
  * is_idle_task - is the specified task an idle task?
  * @tsk: the task in question.
  */
-static inline bool is_idle_task(struct task_struct *p)
+static inline bool is_idle_task(const struct task_struct *p)
 {
 	return p->pid == 0;
 }