提交 7061ca3b 编写于 作者: P Paul E. McKenney

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: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
上级 d8e8ed95
...@@ -2074,7 +2074,7 @@ extern struct task_struct *idle_task(int cpu); ...@@ -2074,7 +2074,7 @@ extern struct task_struct *idle_task(int cpu);
* is_idle_task - is the specified task an idle task? * is_idle_task - is the specified task an idle task?
* @tsk: the task in question. * @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; return p->pid == 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册