From patchwork Fri Mar 4 17:08:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 369 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:59 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs21646qah; Fri, 4 Mar 2011 09:09:03 -0800 (PST) Received: by 10.227.130.130 with SMTP id t2mr816430wbs.7.1299258543179; Fri, 04 Mar 2011 09:09:03 -0800 (PST) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id g26si4569702wbe.4.2011.03.04.09.09.02 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 09:09:03 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-ww0-f50.google.com with SMTP id 31so3099071wwb.31 for ; Fri, 04 Mar 2011 09:09:02 -0800 (PST) Received: by 10.227.198.206 with SMTP id ep14mr774766wbb.174.1299258542749; Fri, 04 Mar 2011 09:09:02 -0800 (PST) Received: from [192.168.0.2] (cpc2-aztw21-0-0-cust264.aztw.cable.virginmedia.com [77.100.97.9]) by mx.google.com with ESMTPS id bd8sm1936896wbb.19.2011.03.04.09.09.01 (version=SSLv3 cipher=OTHER); Fri, 04 Mar 2011 09:09:02 -0800 (PST) Message-ID: <4D711CA9.5050008@linaro.org> Date: Fri, 04 Mar 2011 17:08:57 +0000 From: Lee Jones User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: patches@linaro.org Subject: [PATCH 3/3] plat-nomadik: fix compilation warning From: Linus Walleij The compiler warns that [rf]wimsc may be used uninitialized in this function - the warning is actually false since the uses are in identical if()-clauses, but it can't hurt very much to read out the values to be modified early anyway and rid the warning. Cc: Rabin Vincent Signed-off-by: Linus Walleij --- arch/arm/plat-nomadik/gpio.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) 1.7.3.2 diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index ea31e5f..7062042 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c @@ -138,15 +138,12 @@ static void __nmk_gpio_set_mode_safe(struct nmk_gpio_chip *nmk_chip, unsigned offset, int gpio_mode, bool glitch) { - u32 rwimsc; - u32 fwimsc; + u32 rwimsc = readl(nmk_chip->addr + NMK_GPIO_RWIMSC); + u32 fwimsc = readl(nmk_chip->addr + NMK_GPIO_FWIMSC); if (glitch && nmk_chip->set_ioforce) { u32 bit = BIT(offset); - rwimsc = readl(nmk_chip->addr + NMK_GPIO_RWIMSC); - fwimsc = readl(nmk_chip->addr + NMK_GPIO_FWIMSC); - /* Prevent spurious wakeups */ writel(rwimsc & ~bit, nmk_chip->addr + NMK_GPIO_RWIMSC); writel(fwimsc & ~bit, nmk_chip->addr + NMK_GPIO_FWIMSC); --