From 66389e8583af71f8e01fab7c8e704a6b393663b9 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 14 Sep 2012 12:59:47 +0200 Subject: [PATCH] s390/ptrace: add missing ifdef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if (MACHINE_HAS_TE) translates to if (0) on !CONFIG_64BIT however the compiler still warns about invalid shifts within non-reachable code. So add an explicit ifdef to get rid of this warning: arch/s390/kernel/ptrace.c: In function ‘update_per_regs’: arch/s390/kernel/ptrace.c:63:4: warning: left shift count >= width of type [enabled by default] arch/s390/kernel/ptrace.c:65:4: warning: left shift count >= width of type [enabled by default] Reported-by: Fengguang Wu Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index b817cc5e49ae..a314c57f4e94 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c @@ -53,6 +53,7 @@ void update_per_regs(struct task_struct *task) struct thread_struct *thread = &task->thread; struct per_regs old, new; +#ifdef CONFIG_64BIT /* Take care of the enable/disable of transactional execution. */ if (MACHINE_HAS_TE) { unsigned long cr0, cr0_new; @@ -67,7 +68,7 @@ void update_per_regs(struct task_struct *task) if (cr0 != cr0_new) __ctl_load(cr0_new, 0, 0); } - +#endif /* Copy user specified PER registers */ new.control = thread->per_user.control; new.start = thread->per_user.start; -- GitLab