The 'arg' argument to copy_thread() is only ever used when forking a new
kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency
with do_fork() and other arch-specific implementations of copy_thread()).

Signed-off-by: Alex Dowad <alexinbeij...@gmail.com>
---
 arch/score/kernel/process.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c
index a1519ad3..a72d15f 100644
--- a/arch/score/kernel/process.c
+++ b/arch/score/kernel/process.c
@@ -66,10 +66,10 @@ void exit_thread(void) {}
 void flush_thread(void) {}
 
 /*
- * set up the kernel stack and exception frames for a new process
+ * Copy architecture-specific thread state
  */
 int copy_thread(unsigned long clone_flags, unsigned long usp,
-               unsigned long arg, struct task_struct *p)
+               unsigned long kthread_arg, struct task_struct *p)
 {
        struct thread_info *ti = task_thread_info(p);
        struct pt_regs *childregs = task_pt_regs(p);
@@ -77,11 +77,13 @@ int copy_thread(unsigned long clone_flags, unsigned long 
usp,
 
        p->thread.reg0 = (unsigned long) childregs;
        if (unlikely(p->flags & PF_KTHREAD)) {
+               /* kernel thread */
                memset(childregs, 0, sizeof(struct pt_regs));
                p->thread.reg12 = usp;
-               p->thread.reg13 = arg;
+               p->thread.reg13 = kthread_arg;
                p->thread.reg3 = (unsigned long) ret_from_kernel_thread;
        } else {
+               /* user thread */
                *childregs = *current_pt_regs();
                childregs->regs[7] = 0;         /* Clear error flag */
                childregs->regs[4] = 0;         /* Child gets zero as return 
value */
-- 
2.0.0.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to