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/openrisc/kernel/process.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c
index 386af25..59098c4 100644
--- a/arch/openrisc/kernel/process.c
+++ b/arch/openrisc/kernel/process.c
@@ -114,7 +114,7 @@ extern asmlinkage void ret_from_fork(void);
  * copy_thread
  * @clone_flags: flags
  * @usp: user stack pointer or fn for kernel thread
- * @arg: arg to fn for kernel thread; always NULL for userspace thread
+ * @kthread_arg: arg to fn for kernel thread; always NULL for userspace thread
  * @p: the newly created task
  * @regs: CPU context to copy for userspace thread; always NULL for kthread
  *
@@ -140,10 +140,9 @@ extern asmlinkage void ret_from_fork(void);
  * below); ret_from_fork will then continue its execution causing the
  * 'kernel thread' to return to userspace as a userspace thread.
  */
-
 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 pt_regs *userregs;
        struct pt_regs *kregs;
@@ -165,10 +164,12 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
        kregs = (struct pt_regs *)sp;
 
        if (unlikely(p->flags & PF_KTHREAD)) {
+               /* kernel thread */
                memset(kregs, 0, sizeof(struct pt_regs));
                kregs->gpr[20] = usp; /* fn, kernel thread */
-               kregs->gpr[22] = arg;
+               kregs->gpr[22] = kthread_arg;
        } else {
+               /* user thread */
                *userregs = *current_pt_regs();
 
                if (usp)
-- 
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