[PATCH 14/32] m32r: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-13 Thread Alex Dowad
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 
---
 arch/m32r/kernel/process.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index e69221d..6d5edf2 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -128,21 +128,25 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
return 0; /* Task didn't use the fpu at all. */
 }
 
+/*
+ * Copy architecture-specific thread state
+ */
 int copy_thread(unsigned long clone_flags, unsigned long spu,
-   unsigned long arg, struct task_struct *tsk)
+   unsigned long kthread_arg, struct task_struct *tsk)
 {
struct pt_regs *childregs = task_pt_regs(tsk);
extern void ret_from_fork(void);
extern void ret_from_kernel_thread(void);
 
if (unlikely(tsk->flags & PF_KTHREAD)) {
+   /* kernel thread */
memset(childregs, 0, sizeof(struct pt_regs));
childregs->psw = M32R_PSW_BIE;
childregs->r1 = spu;/* fn */
-   childregs->r0 = arg;
+   childregs->r0 = kthread_arg;
tsk->thread.lr = (unsigned long)ret_from_kernel_thread;
} else {
-   /* Copy registers */
+   /* user thread: copy registers */
*childregs = *current_pt_regs();
if (spu)
childregs->spu = spu;
-- 
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/


[PATCH 14/32] m32r: copy_thread(): rename 'arg' argument to 'kthread_arg'

2015-03-13 Thread Alex Dowad
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/m32r/kernel/process.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index e69221d..6d5edf2 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -128,21 +128,25 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
return 0; /* Task didn't use the fpu at all. */
 }
 
+/*
+ * Copy architecture-specific thread state
+ */
 int copy_thread(unsigned long clone_flags, unsigned long spu,
-   unsigned long arg, struct task_struct *tsk)
+   unsigned long kthread_arg, struct task_struct *tsk)
 {
struct pt_regs *childregs = task_pt_regs(tsk);
extern void ret_from_fork(void);
extern void ret_from_kernel_thread(void);
 
if (unlikely(tsk-flags  PF_KTHREAD)) {
+   /* kernel thread */
memset(childregs, 0, sizeof(struct pt_regs));
childregs-psw = M32R_PSW_BIE;
childregs-r1 = spu;/* fn */
-   childregs-r0 = arg;
+   childregs-r0 = kthread_arg;
tsk-thread.lr = (unsigned long)ret_from_kernel_thread;
} else {
-   /* Copy registers */
+   /* user thread: copy registers */
*childregs = *current_pt_regs();
if (spu)
childregs-spu = spu;
-- 
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/