From patchwork Wed Jan 21 14:48:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 3451 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0LEhrOB021302 for ; Wed, 21 Jan 2009 06:43:54 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753864AbZAUOs3 (ORCPT ); Wed, 21 Jan 2009 09:48:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754104AbZAUOs3 (ORCPT ); Wed, 21 Jan 2009 09:48:29 -0500 Received: from ug-out-1314.google.com ([66.249.92.168]:56138 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753864AbZAUOs2 (ORCPT ); Wed, 21 Jan 2009 09:48:28 -0500 Received: by ug-out-1314.google.com with SMTP id 39so362163ugf.37 for ; Wed, 21 Jan 2009 06:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=fZqW6goENJ0MR3Jtyy7D7TyyiqMrBtnuWyTDXtV/sjk=; b=FCY+FSxmptZhJsIHpxxshl71k71aY4RB/yqOD6MZj5N1YVEPgq7w+OC4vFbTSbIDql Bb4clbOUc0dos3/3FNSoKgc16AjVKCeUapzYrD3EhTs9TEPvLAmmQvg15S1vckDDhnC1 BMH9dVJcGGYnXf5JnREmvZBnSfNJGGR9d+bG8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=fOX927CdlUOzt81OJW7Uy8meU8/WXGpfXakddnjgJVwmAkIiIucbQTptRbki42mMtj Q55o9iExge4nxRAcMA20FLvjEZxI0qjUGzFCoNedVV2VuZKe8MspWqKLdDbuR/o4r+es WCohgoo5IccFTj+WOfvPkmFuk9kV6hRhw5Ia8= Received: by 10.67.88.7 with SMTP id q7mr2645610ugl.76.1232549306498; Wed, 21 Jan 2009 06:48:26 -0800 (PST) Received: from ?192.168.1.115? (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 18sm15920633ugk.52.2009.01.21.06.48.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Jan 2009 06:48:26 -0800 (PST) Message-ID: <497735BA.4060201@gmail.com> Date: Wed, 21 Jan 2009 15:48:26 +0100 From: Roel Kluin User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: Paul Mundt CC: linux-sh@vger.kernel.org Subject: [PATCH] SH: fix user_stack_pointer macros Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org When these macros aren't called with regs, e.g. with foo this will incorectly expand to foo->foo[*]. Signed-off-by: Roel Kluin --- -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h index 6078d8e..a90b6df 100644 --- a/arch/sh/include/asm/kprobes.h +++ b/arch/sh/include/asm/kprobes.h @@ -16,7 +16,7 @@ typedef u16 kprobe_opcode_t; ? (MAX_STACK_SIZE) \ : (((unsigned long)current_thread_info()) + THREAD_SIZE - (ADDR))) -#define regs_return_value(regs) ((regs)->regs[0]) +#define regs_return_value(x) ((x)->regs[0]) #define flush_insn_slot(p) do { } while (0) #define kretprobe_blacklist_size 0 diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index d79063c..5d7d4e3 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h @@ -189,7 +189,7 @@ extern unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[15]) -#define user_stack_pointer(regs) ((regs)->regs[15]) +#define user_stack_pointer(x) ((x)->regs[15]) #if defined(CONFIG_CPU_SH2A) || defined(CONFIG_CPU_SH3) || \ defined(CONFIG_CPU_SH4) diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 803177f..beb62ea 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h @@ -226,7 +226,7 @@ extern unsigned long get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) ((tsk)->thread.pc) #define KSTK_ESP(tsk) ((tsk)->thread.sp) -#define user_stack_pointer(regs) ((regs)->regs[15]) +#define user_stack_pointer(x) ((x)->regs[15]) #endif /* __ASSEMBLY__ */ #endif /* __ASM_SH_PROCESSOR_64_H */