From patchwork Sat Jan 1 18:36:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 443251 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p01IaqBH021079 for ; Sat, 1 Jan 2011 18:36:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751176Ab1AASgk (ORCPT ); Sat, 1 Jan 2011 13:36:40 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:44338 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973Ab1AASgj (ORCPT ); Sat, 1 Jan 2011 13:36:39 -0500 Received: by ewy5 with SMTP id 5so5688072ewy.19 for ; Sat, 01 Jan 2011 10:36:37 -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:subject:content-type :content-transfer-encoding; bh=srksSBCd3U1Zu6EwF+vN+wXLy0UABztYkw5s0JSg8i8=; b=v/N7eGDIGvgn3sC57YA04hp32gayLl+J2qauoqXL9aK6thNzaLzf18iY07NeLGNrrU Om/aXLzMm5P0n+kvx7ImSLHjUhWJAoR6y9kD+ZuuVQPQQTltW5TnFftE6KcCL+iPnErb o0/unceOgzIDTgUR1ULWRZHGV0U1ZbKTMM1tw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=SAgWOWUp57iLIzh+/NsolLLAczRCm0+pNQn/+sRdkT7huC76FZl1gECuPc0tSJnRUt EFyZaMcZUC0U4HJNxRtBrroGaCPdcAgOpz5AySCWii3sv8oqTbeGihT8NR+IXkp1nTRQ TR7uka03UczdWBX8tb+fkwjHCz7UANujQOYtg= Received: by 10.213.27.136 with SMTP id i8mr4253478ebc.11.1293906997818; Sat, 01 Jan 2011 10:36:37 -0800 (PST) Received: from [192.168.1.7] (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id q58sm13294321eeh.9.2011.01.01.10.36.36 (version=SSLv3 cipher=RC4-MD5); Sat, 01 Jan 2011 10:36:37 -0800 (PST) Message-ID: <4D1F7434.4090108@gmail.com> Date: Sat, 01 Jan 2011 19:36:36 +0100 From: roel kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Andrew Morton , LKML , lethal@linux-sh.org, linux-sh@vger.kernel.org Subject: [PATCH] sh: correct definitions to access stack pointers Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 01 Jan 2011 18:36:52 +0000 (UTC) diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index f6edc10..de167d3 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h @@ -40,8 +40,8 @@ #include #define user_mode(regs) (((regs)->sr & 0x40000000)==0) -#define user_stack_pointer(regs) ((unsigned long)(regs)->regs[15]) -#define kernel_stack_pointer(regs) ((unsigned long)(regs)->regs[15]) +#define user_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) +#define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) #define instruction_pointer(regs) ((unsigned long)(regs)->pc) extern void show_regs(struct pt_regs *); diff --git a/arch/sh/include/asm/ptrace_32.h b/arch/sh/include/asm/ptrace_32.h index 35d9e25..6c2239c 100644 --- a/arch/sh/include/asm/ptrace_32.h +++ b/arch/sh/include/asm/ptrace_32.h @@ -76,7 +76,7 @@ struct pt_dspregs { #ifdef __KERNEL__ #define MAX_REG_OFFSET offsetof(struct pt_regs, tra) -#define regs_return_value(regs) ((regs)->regs[0]) +#define regs_return_value(_regs) ((_regs)->regs[0]) #endif /* __KERNEL__ */ diff --git a/arch/sh/include/asm/ptrace_64.h b/arch/sh/include/asm/ptrace_64.h index d43c1cb..bf9be77 100644 --- a/arch/sh/include/asm/ptrace_64.h +++ b/arch/sh/include/asm/ptrace_64.h @@ -13,7 +13,7 @@ struct pt_regs { #ifdef __KERNEL__ #define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) -#define regs_return_value(regs) ((regs)->regs[3]) +#define regs_return_value(_regs) ((_regs)->regs[3]) #endif /* __KERNEL__ */