Skip to contentSkip to conversation

arch/score/kernel/process.c: Remove useless varialbes 'ti' and 'regs'

PATCH In review Chen Gang 2 participants 2 messages Jun 8, 2014 – Jun 12, 2014

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arch/score/kernel/process.c: Remove useless varialbes 'ti' and 'regs'

They are useless, so remove them, the related warning (with allmodconfig under score):

CC arch/score/kernel/process.o
arch/score/kernel/process.c: In function 'copy_thread':
arch/score/kernel/process.c:76:18: warning: unused variable 'regs' [-Wunused-variable]

    struct pt_regs *regs = current_pt_regs();
                    ^
  arch/score/kernel/process.c:74:22: warning: unused variable 'ti' [-Wunused-variable]
    struct thread_info *ti = task_thread_info(p);
                        ^
---
 arch/score/kernel/process.c | 2 --
 1 file changed, 2 deletions(-)
arch/score/kernel/process.c +0 -2
index a1519ad3..50bf1b0 100644
@@ -71,9 +71,7 @@ void flush_thread(void) {}
 int copy_thread(unsigned long clone_flags, unsigned long usp,
 		unsigned long arg, struct task_struct *p)
 {
-	struct thread_info *ti = task_thread_info(p);
 	struct pt_regs *childregs = task_pt_regs(p);
-	struct pt_regs *regs = current_pt_regs();
 
 	p->thread.reg0 = (unsigned long) childregs;
 	if (unlikely(p->flags & PF_KTHREAD)) {
Signature · 1 line
1.7.11.7
Acked-by on v1 1/1
#1 lore raw

It's ok for S+core
Thanks.

2014-06-08 14:58 GMT+08:00 Chen Gang <[email protected]>:

Quoted 33 lines

They are useless, so remove them, the related warning (with allmodconfig under score):

CC arch/score/kernel/process.o
arch/score/kernel/process.c: In function 'copy_thread':
arch/score/kernel/process.c:76:18: warning: unused variable 'regs' [-Wunused-variable]

    struct pt_regs *regs = current_pt_regs();
                    ^
  arch/score/kernel/process.c:74:22: warning: unused variable 'ti' [-Wunused-variable]
    struct thread_info *ti = task_thread_info(p);
                        ^
---
 arch/score/kernel/process.c | 2 --
 1 file changed, 2 deletions(-)
arch/score/kernel/process.c +0 -3
index a1519ad3..50bf1b0 100644
@@ -71,9 +71,7 @@ void flush_thread(void) {}
 int copy_thread(unsigned long clone_flags, unsigned long usp,
                unsigned long arg, struct task_struct *p)
 {
-       struct thread_info *ti = task_thread_info(p);
        struct pt_regs *childregs = task_pt_regs(p);
-       struct pt_regs *regs = current_pt_regs();
 
        p->thread.reg0 = (unsigned long) childregs;
        if (unlikely(p->flags & PF_KTHREAD)) {
--

1.7.11.7