From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161165AbbCMSQU (ORCPT ); Fri, 13 Mar 2015 14:16:20 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:33358 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161133AbbCMSQL (ORCPT ); Fri, 13 Mar 2015 14:16:11 -0400 From: Alex Dowad To: linux-kernel@vger.kernel.org Cc: Chen Liqin , Lennox Wu Subject: [PATCH 25/32] score: copy_thread(): rename 'arg' argument to 'kthread_arg' Date: Fri, 13 Mar 2015 20:14:48 +0200 Message-Id: <1426270496-26362-15-git-send-email-alexinbeijing@gmail.com> X-Mailer: git-send-email 2.0.0.GIT In-Reply-To: <1426270496-26362-1-git-send-email-alexinbeijing@gmail.com> References: <1426270496-26362-1-git-send-email-alexinbeijing@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/score/kernel/process.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/score/kernel/process.c b/arch/score/kernel/process.c index a1519ad3..a72d15f 100644 --- a/arch/score/kernel/process.c +++ b/arch/score/kernel/process.c @@ -66,10 +66,10 @@ void exit_thread(void) {} void flush_thread(void) {} /* - * set up the kernel stack and exception frames for a new process + * 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 thread_info *ti = task_thread_info(p); struct pt_regs *childregs = task_pt_regs(p); @@ -77,11 +77,13 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, p->thread.reg0 = (unsigned long) childregs; if (unlikely(p->flags & PF_KTHREAD)) { + /* kernel thread */ memset(childregs, 0, sizeof(struct pt_regs)); p->thread.reg12 = usp; - p->thread.reg13 = arg; + p->thread.reg13 = kthread_arg; p->thread.reg3 = (unsigned long) ret_from_kernel_thread; } else { + /* user thread */ *childregs = *current_pt_regs(); childregs->regs[7] = 0; /* Clear error flag */ childregs->regs[4] = 0; /* Child gets zero as return value */ -- 2.0.0.GIT