[PATCH 28/32] tile: copy_thread(): rename 'arg' argument to 'kthread_arg'

From: Alex Dowad
Date: Fri Mar 13 2015 - 14:16:40 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/tile/kernel/process.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c
index 48e5773..bff52e4 100644
--- a/arch/tile/kernel/process.c
+++ b/arch/tile/kernel/process.c
@@ -97,8 +97,11 @@ void arch_release_thread_info(struct thread_info *info)

static void save_arch_state(struct thread_struct *t);

+/*
+ * Copy architecture-specific thread state
+ */
int copy_thread(unsigned long clone_flags, unsigned long sp,
- unsigned long arg, struct task_struct *p)
+ unsigned long kthread_arg, struct task_struct *p)
{
struct pt_regs *childregs = task_pt_regs(p);
unsigned long ksp;
@@ -130,15 +133,15 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
memset(&callee_regs[2], 0,
(CALLEE_SAVED_REGS_COUNT - 2) * sizeof(unsigned long));
callee_regs[0] = sp; /* r30 = function */
- callee_regs[1] = arg; /* r31 = arg */
+ callee_regs[1] = kthread_arg; /* r31 = arg */
childregs->ex1 = PL_ICS_EX1(KERNEL_PL, 0);
p->thread.pc = (unsigned long) ret_from_kernel_thread;
return 0;
}

/*
- * Start new thread in ret_from_fork so it schedules properly
- * and then return from interrupt like the parent.
+ * user thread: start in ret_from_fork so it schedules properly
+ * and then returns from interrupt like the parent.
*/
p->thread.pc = (unsigned long) ret_from_fork;

--
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/