From patchwork Fri Mar 4 17:02:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 361 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:56 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs21460qah; Fri, 4 Mar 2011 09:02:39 -0800 (PST) Received: by 10.216.16.100 with SMTP id g78mr760754weg.55.1299258158229; Fri, 04 Mar 2011 09:02:38 -0800 (PST) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id f60si3505776wej.119.2011.03.04.09.02.37 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 09:02:38 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 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-wy0-f178.google.com with SMTP id 28so2726741wyf.37 for ; Fri, 04 Mar 2011 09:02:37 -0800 (PST) Received: by 10.227.174.79 with SMTP id s15mr781535wbz.76.1299258157857; Fri, 04 Mar 2011 09:02:37 -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 o6sm1938903wbo.3.2011.03.04.09.02.36 (version=SSLv3 cipher=OTHER); Fri, 04 Mar 2011 09:02:36 -0800 (PST) Message-ID: <4D711B28.7030900@linaro.org> Date: Fri, 04 Mar 2011 17:02:32 +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 2/2] 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 5e6653f..45b1cf9 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c @@ -134,15 +134,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); --