public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mips: Fix build error seen in some configurations
@ 2013-11-25 23:21 Guenter Roeck
  2013-11-26  0:09 ` David Daney
  0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2013-11-25 23:21 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, linux-kernel, Guenter Roeck

The following build error is seen if CONFIG_32BIT is undefined,
CONFIG_64BIT is defined, and CONFIG_MIPS32_O32 is undefined.

asm/syscall.h: In function 'mips_get_syscall_arg':
arch/mips/include/asm/syscall.h:32:16: error: unused variable 'usp' [-Werror=unused-variable]
cc1: all warnings being treated as errors

Fixes: c0ff3c53d4f9 ('MIPS: Enable HAVE_ARCH_TRACEHOOK')
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/mips/include/asm/syscall.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index 81c8913..33e8dbf 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -29,7 +29,7 @@ static inline long syscall_get_nr(struct task_struct *task,
 static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
 	struct task_struct *task, struct pt_regs *regs, unsigned int n)
 {
-	unsigned long usp = regs->regs[29];
+	unsigned long usp __maybe_unused = regs->regs[29];
 
 	switch (n) {
 	case 0: case 1: case 2: case 3:
-- 
1.7.9.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mips: Fix build error seen in some configurations
  2013-11-25 23:21 [PATCH] mips: Fix build error seen in some configurations Guenter Roeck
@ 2013-11-26  0:09 ` David Daney
  0 siblings, 0 replies; 2+ messages in thread
From: David Daney @ 2013-11-26  0:09 UTC (permalink / raw)
  To: Guenter Roeck, Ralf Baechle; +Cc: linux-mips, linux-kernel

On 11/25/2013 03:21 PM, Guenter Roeck wrote:
> The following build error is seen if CONFIG_32BIT is undefined,
> CONFIG_64BIT is defined, and CONFIG_MIPS32_O32 is undefined.
>
> asm/syscall.h: In function 'mips_get_syscall_arg':
> arch/mips/include/asm/syscall.h:32:16: error: unused variable 'usp' [-Werror=unused-variable]
> cc1: all warnings being treated as errors
>
> Fixes: c0ff3c53d4f9 ('MIPS: Enable HAVE_ARCH_TRACEHOOK')
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: David Daney <david.daney@cavium.com>

> ---
>   arch/mips/include/asm/syscall.h |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
> index 81c8913..33e8dbf 100644
> --- a/arch/mips/include/asm/syscall.h
> +++ b/arch/mips/include/asm/syscall.h
> @@ -29,7 +29,7 @@ static inline long syscall_get_nr(struct task_struct *task,
>   static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
>   	struct task_struct *task, struct pt_regs *regs, unsigned int n)
>   {
> -	unsigned long usp = regs->regs[29];
> +	unsigned long usp __maybe_unused = regs->regs[29];
>
>   	switch (n) {
>   	case 0: case 1: case 2: case 3:
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-26  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 23:21 [PATCH] mips: Fix build error seen in some configurations Guenter Roeck
2013-11-26  0:09 ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox