From patchwork Thu Jul 14 09:53:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102020 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1439716qga; Thu, 14 Jul 2016 02:55:36 -0700 (PDT) X-Received: by 10.98.26.133 with SMTP id a127mr10946377pfa.46.1468490136088; Thu, 14 Jul 2016 02:55:36 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bv8si2170340pab.191.2016.07.14.02.55.33; Thu, 14 Jul 2016 02:55:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751102AbcGNJz2 (ORCPT + 30 others); Thu, 14 Jul 2016 05:55:28 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:63137 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbcGNJzS (ORCPT ); Thu, 14 Jul 2016 05:55:18 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0Lle2C-1aoZdz1K0u-00ZNmD; Thu, 14 Jul 2016 11:54:19 +0200 From: Arnd Bergmann To: Brian Norris Cc: Teresa Remmet , Arnd Bergmann , Boris Brezillon , Richard Weinberger , David Woodhouse , Roger Quadros , Tony Lindgren , "Cooper Jr., Franklin" , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: nand: omap2: add missing braces Date: Thu, 14 Jul 2016 11:53:48 +0200 Message-Id: <20160714095416.739127-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:YorLmJoDAaJL8rN51LQH1m22jw2zMx584xn14MFqKyumMiHTgpr EXrDd9g4SvoGqeby31X1vLVdM7MWeWqMXmHMUx48x2aen/JloByXoTO4f2BVPfQtUk4sF6S y3giz0A1J2lZIM6VawTw5uLNpia40BB65EgvGgBuC/sdAeHjNUp39L3Xkv7lyQfu9GmO+j0 HHc1aXJOJ5J3i5uNum7ng== X-UI-Out-Filterresults: notjunk:1; V01:K0:DKpJ2md+f0o=:qQrgvtkUsNtDJKV/tWLKJU MBLUOfMsZYtusXyeIy7zQO3doyZnA8HaVXIjHLugEuY3XEBFA47Ms87wVHRxnalyqgh0wm34c hIwV4l+yqrAujjT+R4KoYufy6JCqKh5I9SjpsYlHfL4F6WsHJ0Cg9X74EqqJQ6+vlUNipaai3 r3R9CzM6bKMYv2GBkAsxkgVgLA8G+Jc4E/QMGot3w4CmrScpUwMFcCcTXZt5k3SqTvXB7sLPy poD5gOMTe1bAjzXWB63BnzhjLMX80g66T4TFPViLQexXuxQJLH88YfX5gIL6E3ciB4j6cw54K Yz40eUHgfICHg69CIS/j05V6XBZBzItasBffJ1yb151/FmjzazEUV2Bw9XT1AIp+xIvKJyPnL ryca0F0A3kd4sZDsLqvWkOkqcmTLr1rPbY1mHoNvBP/5yBS+4I6qJ3hFMd+Ri5NKc8F0L2pUS b5bY5IhYm6XiWcHY6G/+dlIzOfaSiI3rYc+YtBDVBIKt2CNnT4+0BIQ/ctBSIJrFRkNUCB1qU fQINXluvCUxRu/YXtDBKt6LFQGoamT30mzAwL9d4GbL7T3MLPqWZsRwFDI9Cs6IcQGnnJH27g E56Uipz705mLE0Hb2SF0bAdgnqSWSLZ6veRdULyvfq4gXHn542U1V6p8zlEjhHfA6YR5nL3+J 3N/2eN040eeQPwj+fXXaaD1aGAUChqkf1i0cP6PW1YPQ03/B4a85vnqPyeVx9/0wlCjg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A bug fix just introduced incorrect behavior in the omap2 nand driver, as found by gcc-6.1: drivers/mtd/nand/omap2.c: In function 'omap_get_dt_info': drivers/mtd/nand/omap2.c:1658:2: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if (!info->elm_of_node) ^~ drivers/mtd/nand/omap2.c:1660:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' if (!info->elm_of_node) ^~ We clearly need to put the indented code into { } braces to get the intended behavior. Signed-off-by: Arnd Bergmann Fixes: 3bbca2c54f86 ("mtd: nand: omap2: Add check for old elm binding") --- drivers/mtd/nand/omap2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index a36ad3d146a3..ab7c34096a62 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1655,10 +1655,11 @@ static int omap_get_dt_info(struct device *dev, struct omap_nand_info *info) /* detect availability of ELM module. Won't be present pre-OMAP4 */ info->elm_of_node = of_parse_phandle(child, "ti,elm-id", 0); - if (!info->elm_of_node) + if (!info->elm_of_node) { info->elm_of_node = of_parse_phandle(child, "elm_id", 0); if (!info->elm_of_node) dev_dbg(dev, "ti,elm-id not in DT\n"); + } /* select ecc-scheme for NAND */ if (of_property_read_string(child, "ti,nand-ecc-opt", &s)) {