[PATCH 20/32] nios2: copy_thread(): rename 'arg' argument to 'kthread_arg'

From: Alex Dowad
Date: Fri Mar 13 2015 - 14:15:59 EST


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 <alexinbeijing@xxxxxxxxx>
---
arch/nios2/kernel/process.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/nios2/kernel/process.c b/arch/nios2/kernel/process.c
index 0e075b5..f5a0e28 100644
--- a/arch/nios2/kernel/process.c
+++ b/arch/nios2/kernel/process.c
@@ -97,8 +97,12 @@ void flush_thread(void)
set_fs(USER_DS);
}

+/*
+ * Copy architecture-specific thread state
+ */
int copy_thread(unsigned long clone_flags,
- unsigned long usp, unsigned long arg, struct task_struct *p)
+ unsigned long usp, unsigned long kthread_arg,
+ struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
struct pt_regs *regs;
@@ -107,11 +111,12 @@ int copy_thread(unsigned long clone_flags,
((struct switch_stack *)childregs) - 1;

if (unlikely(p->flags & PF_KTHREAD)) {
+ /* kernel thread */
memset(childstack, 0,
sizeof(struct switch_stack) + sizeof(struct pt_regs));

childstack->r16 = usp; /* fn */
- childstack->r17 = arg;
+ childstack->r17 = kthread_arg;
childstack->ra = (unsigned long) ret_from_kernel_thread;
childregs->estatus = STATUS_PIE;
childregs->sp = (unsigned long) childstack;
@@ -121,6 +126,7 @@ int copy_thread(unsigned long clone_flags,
return 0;
}

+ /* user thread */
regs = current_pt_regs();
*childregs = *regs;
childregs->r2 = 0; /* Set the return value for the child. */
--
2.0.0.GIT

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