linux-mips
[Top] [All Lists]

[PATCH] mips: Fix build error seen in some configurations

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] mips: Fix build error seen in some configurations
From: Guenter Roeck <linux@roeck-us.net>
Date: Mon, 25 Nov 2013 15:21:00 -0800
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=KkHBdTzZ94rFQSwLEiksbKhKiqI4SRvY7Q79Vn+SyM4=; b=DULFtrhNI1kY+48FV1rVtNcBlvvZskPzwbi6/BCU7enLIG56aOpbHb9Se5uz2iNUuZ QgDwmOfBn3MZowP9lsIDEHgpaGs9akhbDYHkvC1HgJiPC9R2mD+Y2PmBwKn0+Zw8LkWJ 4TOF78aJ4BGCwjrh7M5CvqrPSAUNmb+U2M1JJiLQ/SZiJlEpyQ0ur0Os7uxPO3xsq7Ws Nt60pej+Iy0uJpbq9x66dOB7Skcyt1T+GpItFNoYHlhc9Ilyg2STvZsLJU50Uavn/ICJ xI7wzoMxCOSaEtG+H3r9dWpcj7NdVqWgUEgZhk3VWSTVZqbqYtER7/JmjbL4NjBUlEOz Yepg==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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


<Prev in Thread] Current Thread [Next in Thread>