Received: by 2002:a17:90a:c8b:0:0:0:0 with SMTP id v11csp2291595pja; Fri, 19 Apr 2019 11:23:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbB+YDiQDJ+rfBK1U6IJ8E37FPL0tvP/Q5AAfDD6YOPbaN1hTBtRCxeFwDivmeQRAwXGa5 X-Received: by 2002:a62:6504:: with SMTP id z4mr5400429pfb.202.1555698238579; Fri, 19 Apr 2019 11:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555698238; cv=none; d=google.com; s=arc-20160816; b=w9pf26q7tAzbI/H8yWFIrzB2/lkuRWU3V+Nlx82KrnvJQMeWPPFeLmUrrYPrjrO97t OVCtZGUIWRERCUJo1/jGptm6Z6OI+hO9IzaK7e3jlk8VjWOizTSLfFMkA4nDtGgvZcyV zUXI9pWwJlgaPktRZw7S+RSy46n1J9Z3N2o7ZYZGIUM82GVXerBNqTCeqS8I0HjhmXe6 6v45oE0iM++30RHudWXc5kGwE62xpxl5Jo3Ipidnz595o8ygJ8Oh44QD16dagf5lhspw LZ7rLZ8uM3K4hbrQx60WkxHFUebPPbjC3VV7TQKsVBXJ+u4cQUcq050OHj0Qg/exgVWE VUvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=i5XCWis3VrTykYK/RrX/WLSMvw74LO5onG7SxOwG69A=; b=TyuvNuwe7OihGZOsxbAZoEcDV+/ry/bGQI4XiX+e2S2phE49sezYNM9mwxidkTEETt 3/MF33acFD0LJHwEJz9OqvdgI1yYk4Zus/Uqu/xGA6N5mwQflapxCJ3FXwMg25O5h0zh 0VhWMOb04frbVyb0Jb7kty424iiiV8z+w1ua6d+ML0jRHH+1QMG4hvzEzMmtSrwGwa0R 8kIEmR3L2m9Qf2fsKFLIuVzdTUE/7CVSbVsqszYRO3TGRHl05xoARg74g5viMlR5Ny7q 7eWT00awMFaEuY5K5fZimB+am8hWjEFoK2aOmR8kGst6iVKHjtECttbhTwD92eTSyNyL bIjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="oudVdW/d"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si5479134pgl.261.2019.04.19.11.23.43; Fri, 19 Apr 2019 11:23:58 -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; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="oudVdW/d"; 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 S1727512AbfDSSW4 (ORCPT + 99 others); Fri, 19 Apr 2019 14:22:56 -0400 Received: from condef-09.nifty.com ([202.248.20.74]:54152 "EHLO condef-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727580AbfDSSWw (ORCPT ); Fri, 19 Apr 2019 14:22:52 -0400 Received: from conuserg-08.nifty.com ([10.126.8.71])by condef-09.nifty.com with ESMTP id x3J9nQSm030507; Fri, 19 Apr 2019 18:49:26 +0900 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id x3J9mDiQ012304; Fri, 19 Apr 2019 18:48:21 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com x3J9mDiQ012304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1555667302; bh=i5XCWis3VrTykYK/RrX/WLSMvw74LO5onG7SxOwG69A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oudVdW/dFWq56OuDzP6kKUzuEWhB1LghoeXto+rXOPNib4DV9Uy/SJlJzj1AbmWfp mevr0XhyqB2vZq4Cz+Z1v2JvWwOv56OiugvEABew3D+o/TOnkAQFO0IulE/o2RPA/B +sTZx4hUEh4VtZpZbGYRBLePR5ICQudFoYOaeslkPILaHXz1Ak62JsBLFHuo6nXW+A HdImamYXzb7Yk06Xdrpl/c4BLwIZGHF/XfL1anllWbvNDOtJizhoIHVpekzfvHeQsK kLoe+3N8CTYNLyxpT4B5He8gmcUsZrbdL7Q+2LWqM5b83Cr/r8gBn0MoV7tumFH5RV 2DmcgtWPSyNuw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Andrew Morton , linux-arch Cc: linux-s390@vger.kernel.org, Heiko Carstens , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Christophe Leroy , Masahiro Yamada Subject: [PATCH v2 05/11] mtd: rawnand: vf610_nfc: add initializer to avoid -Wmaybe-uninitialized Date: Fri, 19 Apr 2019 18:47:48 +0900 Message-Id: <20190419094754.24667-6-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190419094754.24667-1-yamada.masahiro@socionext.com> References: <20190419094754.24667-1-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This prepares to move CONFIG_OPTIMIZE_INLINING from x86 to a common place. We need to eliminate potential issues beforehand. Kbuild test robot has never reported -Wmaybe-uninitialized warning for this probably because vf610_nfc_run() is inlined by the x86 compiler's inlining heuristic. If CONFIG_OPTIMIZE_INLINING is enabled for a different architecture and vf610_nfc_run() is not inlined, the following warning is reported: drivers/mtd/nand/raw/vf610_nfc.c: In function ‘vf610_nfc_cmd’: drivers/mtd/nand/raw/vf610_nfc.c:455:3: warning: ‘offset’ may be used uninitialized in this function [-Wmaybe-uninitialized] vf610_nfc_rd_from_sram(instr->ctx.data.buf.in + offset, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ nfc->regs + NFC_MAIN_AREA(0) + offset, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ trfr_sz, !nfc->data_access); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Masahiro Yamada --- Changes in v2: - split into a separate patch drivers/mtd/nand/raw/vf610_nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c index a662ca1970e5..19792d725ec2 100644 --- a/drivers/mtd/nand/raw/vf610_nfc.c +++ b/drivers/mtd/nand/raw/vf610_nfc.c @@ -364,7 +364,7 @@ static int vf610_nfc_cmd(struct nand_chip *chip, { const struct nand_op_instr *instr; struct vf610_nfc *nfc = chip_to_nfc(chip); - int op_id = -1, trfr_sz = 0, offset; + int op_id = -1, trfr_sz = 0, offset = 0; u32 col = 0, row = 0, cmd1 = 0, cmd2 = 0, code = 0; bool force8bit = false; -- 2.17.1