Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6266882rwr; Tue, 9 May 2023 12:40:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6B4NQBTv4xSnXBmy+glKzF5f4GbnTXj8XB4nSktjWlzadSCY8xSFf8Glr3XepCX/jzPp5T X-Received: by 2002:a05:6a21:99a4:b0:ec:6e2d:5a32 with SMTP id ve36-20020a056a2199a400b000ec6e2d5a32mr18340942pzb.62.1683661211864; Tue, 09 May 2023 12:40:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683661211; cv=none; d=google.com; s=arc-20160816; b=DSen0Fa7p6e9XGbta027KdKa+Nfq7m6I1DMVHJgkYV4QVjc3Em+ArD6JnSwBXurg/6 xsk/HJBzLrv/W5mjeYMrV8kPXuSXc47Q0wtFdFos4JHqsV6CQbiWKwzZ3E1OQppBqdIw UCiclXrJGfP5o+UtNXLWn6Zq28HPM1z9sCu6oNrntQ1PzlpGbRblqO5nStKPiA7iXD6x wCjQYNWhh0Kx+GX7d3cgvxEyCptPnmygA9DnHzhT8j1pbgbn+tzlF1T3RN4N20yIxveF A5cfUeGtEt7IvgdNs8WVJ1Vmkbc+XvQC3VEJjafuBEBXAKljG2lIfBPJlxwDU00tTxbI G+dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tlwZPVonowD5NeZWZeFy+H47+NTAgbeMkTo9feXnAlA=; b=yK7Mmd49NuUUnYoqn4NAc7XI716j007X5KQaI3ntgrnwlNVQLmmZjLOvA0EQuNL7CF Neiu8lw6bwIPIzWB6qZ24YRBpJenDdrkEKVCbr5BzeMdOMHoAvejOlV2w3rfLQjcrAWd q2uhNvhb/Fhmedx1tDS9mvEpafzjR2oiXPkQl7GqoITa1E+50L+Ge+8hSy3BbXGdj6r7 soyRJ1rMlkKIvK4NTHAh9EySnVUeN4c9Zlq0pft54J8SPLLWWtTwFz6MF5SGueOCbhYs 2kSQX2q+atD+MvCqFB+eNoT8KOSQrB1jMNVypyLfvzrAzlHfrztmIhGGV3ZdH2dbo8qq 4unA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BeJ6GqSc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu5-20020a632945000000b0051b578dfc51si2034175pgb.744.2023.05.09.12.39.57; Tue, 09 May 2023 12:40:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BeJ6GqSc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234609AbjEITZS (ORCPT + 99 others); Tue, 9 May 2023 15:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234247AbjEITZQ (ORCPT ); Tue, 9 May 2023 15:25:16 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8632144B8 for ; Tue, 9 May 2023 12:25:13 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4eed764a10cso6969823e87.0 for ; Tue, 09 May 2023 12:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683660312; x=1686252312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tlwZPVonowD5NeZWZeFy+H47+NTAgbeMkTo9feXnAlA=; b=BeJ6GqSc+RR7/1+vIkNUxCKSvDA5qG/OOWU+oO0mA9KWIAKSf1PtpxlJqnx3oDUyM9 3RtjJiGcGxKFmJwhVRTveo7C9HnxnGTB29nElCbmE/HHm9j4Le6x4i7k5+8UfmLZj+8y GxowMC5zK8e6+21tu4nAgdfOYoCgOv3HPsVeo1c348se7xwNhOldLSgzoQk+SOD2W5xI zcqq3DFdYIe6FJvP/flh0JxFECGt4XP4b0bPj6IDYeMdCZzhUfGkRFQjWWCs57aO0Ci+ 0G5/djvNkUr9zlua9KJsCcK0YCwvS+z1UP7NrTBfLqT4o3UmDXiXVFukOjcdhFJ/07hv 3deA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683660312; x=1686252312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tlwZPVonowD5NeZWZeFy+H47+NTAgbeMkTo9feXnAlA=; b=MnqGtNuBwk4RPQbQ7c+Q/8LEfSmbCh259RmU7k3OxW3g8HzBZBEhm95dkHLUnBO7Yn HHVRuP8hHG7S1DAKOe9L6djwc8+tnYeJdVWiuJEFk982iLaLQepcngldG5GplOJUS5i7 27FjONyAkhv2yI8n217p8BRRRwWwFOOFHeGR2shPGe2jKx9We9nSHy+A1AdsYWjJzoRn MlYwIC3miT5+Up6dah+zon/zuvtm9ScGLh/TMgV0ZitIk5gYTYG6VQXGOxkcwA55k124 Ce7Yqmd0yJlfJDLlzTqr7M0tn7MRlc//diOOljqTGYtOezl7zl+zSvygcC1+wOin5lvs XHkw== X-Gm-Message-State: AC+VfDxHYHdpylnpviN9TgTMYNO7h5PvTLRSB4gd7PWx26bK+5Clyzzo BpbtLxieiq2owj6HHj8ENga2Tw== X-Received: by 2002:a05:6512:11c2:b0:4e8:3dc1:70f4 with SMTP id h2-20020a05651211c200b004e83dc170f4mr948054lfr.34.1683660311711; Tue, 09 May 2023 12:25:11 -0700 (PDT) Received: from ta1.c.googlers.com.com (61.215.228.35.bc.googleusercontent.com. [35.228.215.61]) by smtp.gmail.com with ESMTPSA id 19-20020a05651c009300b002a6007383a0sm1681131ljq.135.2023.05.09.12.25.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 12:25:11 -0700 (PDT) From: Tudor Ambarus To: miquel.raynal@bootlin.com Cc: pratyush@kernel.org, michael@walle.cc, richard@nod.at, vigneshr@ti.com, Takahiro.Kuwano@infineon.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, geert@linux-m68k.org, Tudor Ambarus Subject: [PATCH 1/2] mtd: spi-nor: spansion: make sure local struct does not contain garbage Date: Tue, 9 May 2023 19:25:05 +0000 Message-ID: <20230509192506.947094-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.40.1.521.gf1e218fcd8-goog In-Reply-To: <749c2fc2-93dc-585-3826-dea581602d6e@linux-m68k.org> References: <749c2fc2-93dc-585-3826-dea581602d6e@linux-m68k.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Following error was seen with um-x86_64-gcc12/um-allyesconfig: + /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]: => 495:27, 364:27 Initialise local struct spi_mem_op with all zeros at declaration in order to avoid using garbage data for fields that are not explicitly set afterwards. Reported-by: Geert Uytterhoeven Fixes: c87c9b11c53ce ("mtd: spi-nor: spansion: Determine current address mode") Signed-off-by: Tudor Ambarus --- drivers/mtd/spi-nor/spansion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/spansion.c b/drivers/mtd/spi-nor/spansion.c index 15f9a80c10b9..d44ffaac1dba 100644 --- a/drivers/mtd/spi-nor/spansion.c +++ b/drivers/mtd/spi-nor/spansion.c @@ -361,7 +361,7 @@ static int cypress_nor_determine_addr_mode_by_sr1(struct spi_nor *nor, */ static int cypress_nor_set_addr_mode_nbytes(struct spi_nor *nor) { - struct spi_mem_op op; + struct spi_mem_op op = {}; u8 addr_mode; int ret; -- 2.40.1.521.gf1e218fcd8-goog