Message ID | 20190419094754.24667-6-yamada.masahiro@socionext.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp1810238jan; Fri, 19 Apr 2019 02:52:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxANw+LGAq2q2fsmIr9VkcR8hPh9cVlK8wofGoFx82bWliU2xVM5u+F/Ty/z8XiXEu0PgkW X-Received: by 2002:aa7:8019:: with SMTP id j25mr2965958pfi.77.1555667549528; Fri, 19 Apr 2019 02:52:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555667549; cv=none; d=google.com; s=arc-20160816; b=C60ckeyXi3E8W8DOpNWhJg5S9YGleoqPL3KvINiIy0pORgzfVOPprJbDPNbSc6iPCe yHRdm7D7oNUovDH7U0zKRGzcl7yNFigaRtCNeWfZ68OgyKwcBE45v9foOgvF1aamkTy+ n2QC9x/cu0pYNOQBMkNCWuRcrkpQe+F335jMgtTmeR4UA40tqPv5X26F5alDqSKAT5Iu ub27Cozu9FZfHIxfPnHxFM3LkKPBUGKMMedY5XFH/BV/4yP2HrR5/VPWGD7KMyoFzJ1s DvAuN5RbumE1W+e0IeLjcelJi7fZfLhMklWGjcuLxaH5MizkCJHABhd2Vvx11cNxxgQZ y4kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-filter:dkim-signature; bh=KnLCo6iw2mFDeisVB8z/oivTmPZBrhw+X4FuZD+qYHg=; b=dc6XWnAG5pKMFZTInF0GWigbQQnBkmqV/EAhJn1doLvxYwLPaICfxn7OfHD4iRmD2r ioOJl30OQ9rzpVjZjnr0S195gUEIOWoaIdK5P/T27hwvIEhsbQ/Ha3W5qnMcpmJ1/oDi 1kMFP4XmlG+z9h+YdfQL0984IB0GvnbYkF3pUn/2gW9GaiObNQdpXASO4VuPxI2CGorL qcDbo+0Mp78jEmGIMxvTBfRFIIhIEXpQHOVZ7tPM2C1tQbiEWMy5jJvSTgfMHbvulrbr k2XbYxOLIo+mTw7RIhl/AayHbuTn8WI2RUAmYNcse0rhJnHBnKj2Wg3nY9a54HqtDv+E +ltQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=gd4z+9K7; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="oudVdW/d"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" Return-Path: <linux-mtd-bounces+patch=linaro.org@lists.infradead.org> Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id q11si127849pll.181.2019.04.19.02.52.29 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Apr 2019 02:52:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=gd4z+9K7; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b="oudVdW/d"; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KnLCo6iw2mFDeisVB8z/oivTmPZBrhw+X4FuZD+qYHg=; b=gd4z+9K7w46t8E 7JtUrF3GQOajF6uPVilGtyGdV7fTMbtbZgu1ShAMWcXUABPkeVTSz8zSKYiZxafQTl2IlKDXdnDnR qzS9+SOC9OB1qwdtClrUK/qZsg7QfnwOcN4oEMX3A3NfSmiE+j/cQLB53VlpJQrfvW3RuyNIaUcjV 8F407cyfPjXJitb0STWmfxx0voKeHcKecDZQPfoAT43yiSn1YXjotkRyrDdYNlOi2Grz80ramoUgy 8syEdPEawRV25VfQTK413ykqu/vSjvfX+Vv3uh1gAbU3BIM558o61v7tBn7M+Sp34ozF92XplI9hV eWS1AWDN1M9wEiIzykxA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQC1-0003hX-LW; Fri, 19 Apr 2019 09:52:25 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hHQ8a-0006aX-KF; Fri, 19 Apr 2019 09:48:59 +0000 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 <yamada.masahiro@socionext.com> To: Andrew Morton <akpm@linux-foundation.org>, linux-arch <linux-arch@vger.kernel.org> 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190419_024853_140263_DE59B820 X-CRM114-Status: GOOD ( 11.04 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [210.131.2.75 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Cc: Christophe Leroy <christophe.leroy@c-s.fr>, linux-s390@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, x86@kernel.org, Heiko Carstens <heiko.carstens@de.ibm.com>, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada <yamada.masahiro@socionext.com>, Ingo Molnar <mingo@redhat.com>, linux-mtd@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org |
Series |
compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING
|
expand
|
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;
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 <yamada.masahiro@socionext.com> --- Changes in v2: - split into a separate patch drivers/mtd/nand/raw/vf610_nfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)