From patchwork Thu Aug 15 19:31:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2845264 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0C53DBF546 for ; Thu, 15 Aug 2013 19:32:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3305720371 for ; Thu, 15 Aug 2013 19:32:00 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B2DF2037A for ; Thu, 15 Aug 2013 19:31:57 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA3H0-0005sc-Tv; Thu, 15 Aug 2013 19:31:55 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA3Gy-0007Ao-4b; Thu, 15 Aug 2013 19:31:52 +0000 Received: from mail-la0-f44.google.com ([209.85.215.44]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VA3Gu-00079i-Px for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2013 19:31:49 +0000 Received: by mail-la0-f44.google.com with SMTP id eo20so858140lab.17 for ; Thu, 15 Aug 2013 12:31:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=o4EN01aQcr9SNPL0Rf46LHwnOlpvcPQyc3zGFZWXp4A=; b=BRBLiJwc7UCX3zJi2JxLb/8lUCyMHdCTR5unRLw9oK68IXkjeCLB7AVCHitXA2PhTg WMWyJWkdt09ArLw3uD1Hhd5GEWr8qsrC30paVLTMkHUDY+hPYX8Rd8I1GV1bkC7Pnzk3 Mczaxxo3iZwqLLqALulZr90o9uNNjsowakR7vGwKg4tgfxOQcju1H2w5NQ+PWAawCIlt HVvZ8z7xyXyoAde3ihqt56Ld0CD4gu3Klb5d/084froGFlGKy5BQChJ3A40Jxx9FmeTk QyCP486MkGIUyrembKBfR36qDIWFuUEnZ28NbRgzEH4j6SxrYcGIiESjxoVv+sazsqV8 hjDA== X-Gm-Message-State: ALoCoQl3kRESy7tH6xc/c1GDzI1ACwga/KvsfLOKg7bpL8W+WMIYKdjBbZr4bCA1/y0ZrCeL4YNZ X-Received: by 10.112.52.225 with SMTP id w1mr7748136lbo.31.1376595084276; Thu, 15 Aug 2013 12:31:24 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-76.bredband.comhem.se. [83.249.208.76]) by mx.google.com with ESMTPSA id k6sm178088lae.9.2013.08.15.12.31.22 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 12:31:23 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] pinctrl: nomadik: shut up a warning for flags Date: Thu, 15 Aug 2013 21:31:15 +0200 Message-Id: <1376595075-791-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130815_153148_992870_B9EBDBE5 X-CRM114-Status: GOOD ( 12.91 ) X-Spam-Score: -2.6 (--) Cc: Linus Walleij , Stephen Warren X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The irq flags variable gets a warning like this after commit bf4dae5ce1b95a5932e43036edcf3f1b324758c6 "pinctrl: nomadik: delete ancient pin control API": In file included from include/linux/seqlock.h:29:0, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/pinctrl/pinctrl-nomadik.c:14: drivers/pinctrl/pinctrl-nomadik.c: In function 'nmk_pmx_enable': include/linux/spinlock.h:348:122: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized] raw_spin_unlock_irqrestore(&lock->rlock, flags); ^ drivers/pinctrl/pinctrl-nomadik.c:1515:16: note: 'flags' was declared here unsigned long flags; The function is question was never changed but it appears the semantic checker could previously determine that the code path that would use the flags was going to either use it or not, but now it can't for some reason. Just fix it up. Reported-by: Olof Johansson Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 89280bc..a8b8a53 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c @@ -1512,7 +1512,7 @@ static int nmk_pmx_enable(struct pinctrl_dev *pctldev, unsigned function, struct nmk_pinctrl *npct = pinctrl_dev_get_drvdata(pctldev); const struct nmk_pingroup *g; static unsigned int slpm[NUM_BANKS]; - unsigned long flags; + unsigned long flags = 0; bool glitch; int ret = -EINVAL; int i;