linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: AR7: Fix GCC 4.6.0 build error.

To: Alexander Clouter <alex@digriz.org.uk>
Subject: Re: [PATCH] MIPS: AR7: Fix GCC 4.6.0 build error.
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Fri, 13 May 2011 19:31:21 +0400
Cc: linux-mips@linux-mips.org, florian@openwrt.org
In-reply-to: <20110513152855.GM25017@chipmunk>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20110513152855.GM25017@chipmunk>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
Hello.

Alexander Clouter wrote:

  CC      arch/mips/ar7/gpio.o
arch/mips/ar7/gpio.c: In function 'ar7_gpio_init':
arch/mips/ar7/gpio.c:318:11: error: variable 'size' set but not used 
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
---
 arch/mips/ar7/gpio.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/mips/ar7/gpio.c b/arch/mips/ar7/gpio.c
index 425dfa5..6917427 100644
--- a/arch/mips/ar7/gpio.c
+++ b/arch/mips/ar7/gpio.c
@@ -314,16 +314,8 @@ static void titan_gpio_init(void)
 int __init ar7_gpio_init(void)
 {
        int ret;
-       struct ar7_gpio_chip *gpch;
-       unsigned size;
-
-       if (!ar7_is_titan()) {
-               gpch = &ar7_gpio_chip;
-               size = 0x10;
-       } else {
-               gpch = &titan_gpio_chip;
-               size = 0x1f;
-       }
+       struct ar7_gpio_chip *gpch = (!ar7_is_titan())

Parens around (!x) are not really necessary. Perhaps Ralf could remove them while applying...

+               ? &ar7_gpio_chip : &titan_gpio_chip;

WBR, Sergei

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