From: Hans-Christian Egtvedt <egtvedt@samfundet.no>
To: Alex Dowad <alexinbeijing@gmail.com>
Cc: hskinnemoen@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2 06/32] avr32: copy_thread(): rename 'arg' argument to 'kthread_arg'
Date: Mon, 16 Mar 2015 10:52:14 +0100 [thread overview]
Message-ID: <20150316095214.GA19962@samfundet.no> (raw)
In-Reply-To: <1426493909-15989-1-git-send-email-alexinbeijing@gmail.com>
Around Mon 16 Mar 2015 10:18:29 +0200 or thereabout, Alex Dowad wrote:
> The 'arg' argument to copy_thread() is only ever used when forking a new
> kernel thread. Hence, rename it to 'kthread_arg' for clarity.
>
> Signed-off-by: Alex Dowad <alexinbeijing@gmail.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> ---
>
> Dear Hans-Christian Egtvedt,
>
> Thanks for your feedback! I have removed the unneeded comments.
>
> AD
>
> arch/avr32/kernel/process.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
> index 42a53e74..a255bd3 100644
> --- a/arch/avr32/kernel/process.c
> +++ b/arch/avr32/kernel/process.c
> @@ -279,20 +279,25 @@ asmlinkage void ret_from_fork(void);
> asmlinkage void ret_from_kernel_thread(void);
> asmlinkage void syscall_return(void);
>
> +/*
> + * Copy architecture-specific thread state
> + */
> int copy_thread(unsigned long clone_flags, unsigned long usp,
> - unsigned long arg,
> + unsigned long kthread_arg,
> struct task_struct *p)
> {
> struct pt_regs *childregs = task_pt_regs(p);
>
> if (unlikely(p->flags & PF_KTHREAD)) {
> memset(childregs, 0, sizeof(struct pt_regs));
> - p->thread.cpu_context.r0 = arg;
> + p->thread.cpu_context.r0 = kthread_arg;
> p->thread.cpu_context.r1 = usp; /* fn */
> p->thread.cpu_context.r2 = (unsigned long)syscall_return;
> p->thread.cpu_context.pc = (unsigned long)ret_from_kernel_thread;
> childregs->sr = MODE_SUPERVISOR;
> } else {
> *childregs = *current_pt_regs();
> if (usp)
> childregs->sp = usp;
--
mvh
Hans-Christian Egtvedt
next prev parent reply other threads:[~2015-03-16 9:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 18:04 [PATCH 01/32] do_fork(): Rename 'stack_size' argument to reflect actual use Alex Dowad
2015-03-13 18:04 ` [PATCH 02/32] alpha: copy_thread(): rename 'arg' argument to 'kthread_arg' Alex Dowad
2015-03-13 18:04 ` Alex Dowad
2015-03-13 18:04 ` [PATCH 03/32] arc: " Alex Dowad
2015-03-25 11:47 ` Vineet Gupta
2015-03-25 12:34 ` Alex Dowad
2015-03-25 12:37 ` Vineet Gupta
2015-03-13 18:04 ` [PATCH 04/32] arm: copy_thread(): rename 'stk_sz' " Alex Dowad
2015-03-13 18:04 ` Alex Dowad
2015-03-13 18:04 ` [PATCH 05/32] arm64: " Alex Dowad
2015-03-13 18:04 ` Alex Dowad
2015-03-13 18:04 ` [PATCH 06/32] avr32: copy_thread(): rename 'arg' " Alex Dowad
2015-03-16 7:03 ` Hans-Christian Egtvedt
2015-03-16 8:18 ` [PATCHv2 " Alex Dowad
2015-03-16 9:52 ` Hans-Christian Egtvedt [this message]
2015-03-13 18:04 ` [PATCH 07/32] blackfin: copy_thread(): rename 'topstk' " Alex Dowad
2015-03-13 18:04 ` [PATCH 08/32] c6x: copy_thread(): rename 'ustk_size' " Alex Dowad
2015-03-13 18:04 ` [PATCH 09/32] cris/arch-v10: copy_thread(): rename 'arg' " Alex Dowad
2015-03-25 11:20 ` Jesper Nilsson
2015-03-13 18:04 ` [PATCH 10/32] cris/arch-v32: " Alex Dowad
2015-03-25 11:20 ` Jesper Nilsson
2015-03-13 18:18 ` [PATCH 01/32] do_fork(): Rename 'stack_size' argument to reflect actual use Aaron Tomlin
2015-03-13 23:04 ` josh
2015-03-13 23:21 ` David Rientjes
2015-03-14 17:14 ` Alex Dowad
2015-03-14 16:19 ` Alex Dowad
2015-03-14 17:30 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150316095214.GA19962@samfundet.no \
--to=egtvedt@samfundet.no \
--cc=alexinbeijing@gmail.com \
--cc=hskinnemoen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.