[PATCH 17/32] microblaze: copy_thread(): rename 'arg' argument to 'kthread_arg'

From: Alex Dowad
Date: Fri Mar 13 2015 - 14:20:31 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/microblaze/kernel/process.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index b2dd371..d4ecb98 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -51,20 +51,22 @@ void flush_thread(void)
{
}

+/*
+ * 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 pt_regs *childregs = task_pt_regs(p);
struct thread_info *ti = task_thread_info(p);

if (unlikely(p->flags & PF_KTHREAD)) {
- /* if we're creating a new kernel thread then just zeroing all
- * the registers. That's OK for a brand new thread.*/
+ /* kernel thread: just zero all the registers */
memset(childregs, 0, sizeof(struct pt_regs));
memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
ti->cpu_context.r1 = (unsigned long)childregs;
ti->cpu_context.r20 = (unsigned long)usp; /* fn */
- ti->cpu_context.r19 = (unsigned long)arg;
+ ti->cpu_context.r19 = kthread_arg;
childregs->pt_mode = 1;
local_save_flags(childregs->msr);
#ifdef CONFIG_MMU
@@ -73,6 +75,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
ti->cpu_context.r15 = (unsigned long)ret_from_kernel_thread - 8;
return 0;
}
+
+ /* user thread */
*childregs = *current_pt_regs();
if (usp)
childregs->r1 = usp;
--
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/