LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Alex Dowad <alexinbeijing@gmail.com>,
	"linux-kernel@vget.kernel.org" <linux-kernel@vget.kernel.org>
Cc: open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/32] arc: copy_thread(): rename 'arg' argument to 'kthread_arg'
Date: Wed, 25 Mar 2015 11:47:21 +0000	[thread overview]
Message-ID: <C2D7FE5348E1B147BCA15975FBA2307566596B4F@IN01WEMBXB.internal.synopsys.com> (raw)
In-Reply-To: <1426269888-25600-3-git-send-email-alexinbeijing@gmail.com>

On Friday 13 March 2015 11:35 PM, 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 (and consistency
> with do_fork() and other arch-specific implementations of copy_thread()).
>
> Signed-off-by: Alex Dowad <alexinbeijing@gmail.com>
> ---
>  arch/arc/kernel/process.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c
> index fdd8971..cf366bd 100644
> --- a/arch/arc/kernel/process.c
> +++ b/arch/arc/kernel/process.c
> @@ -49,7 +49,9 @@ void arch_cpu_idle(void)
>  
>  asmlinkage void ret_from_fork(void);
>  
> -/* Layout of Child kernel mode stack as setup at the end of this function is
> +/* Copy architecture-specific thread state
> + *
> + * Layout of Child kernel mode stack as setup at the end of this function is
>   *
>   * |     ...        |
>   * |     ...        |
> @@ -81,7 +83,7 @@ asmlinkage void ret_from_fork(void);
>   * ------------------  <===== END of PAGE
>   */
>  int copy_thread(unsigned long clone_flags,
> -		unsigned long usp, unsigned long arg,
> +		unsigned long usp, unsigned long kthread_arg,
>  		struct task_struct *p)
>  {
>  	struct pt_regs *c_regs;        /* child's pt_regs */
> @@ -110,9 +112,10 @@ int copy_thread(unsigned long clone_flags,
>  	childksp[1] = (unsigned long)ret_from_fork; /* blink */
>  
>  	if (unlikely(p->flags & PF_KTHREAD)) {
> +		/* kernel thread */

This seems extraneous given that PF_KTHREAD above check makes is obvious that this
is a kernel thread.

>  		memset(c_regs, 0, sizeof(struct pt_regs));
>  
> -		c_callee->r13 = arg; /* argument to kernel thread */
> +		c_callee->r13 = kthread_arg;
>  		c_callee->r14 = usp;  /* function */
>  
>  		return 0;

Applied to for-next after pruning the comment above.

Thx,
-Vineet

  reply	other threads:[~2015-03-25 11:47 UTC|newest]

Thread overview: 24+ 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 ` [PATCH 03/32] arc: " Alex Dowad
2015-03-25 11:47   ` Vineet Gupta [this message]
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 ` [PATCH 05/32] arm64: " 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
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=C2D7FE5348E1B147BCA15975FBA2307566596B4F@IN01WEMBXB.internal.synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=alexinbeijing@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kernel@vget.kernel.org \
    --subject='Re: [PATCH 03/32] arc: copy_thread(): rename '\''arg'\'' argument to '\''kthread_arg'\''' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).