From patchwork Thu Aug 22 16:46:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 1975650 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Z7WjeV4d; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=MRSY2vCN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WqTgp6fzjz1yYZ for ; Fri, 23 Aug 2024 02:49:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=1kXKE4VTnBKQ/nZMROMnm4HYkUjH7cnA0tpjwbtYyNg=; b=Z7WjeV4dO9rado KpRE+3iED2ezNVizYo1sBXEpYZCOdgR9v/jpwhawopenCWcOkfGblAHa7FRe1mnWZ2YO2WkCUH/NG Wc9bXRFhFd99hzbfg67FRs0gT1t7ehROieg3TjRqmJCmfrx4eAZ8S3jQgNzgmDRb6iSqd3hJcNSwv qsMHdxo195mQD7LVSzOVnTCzt1AKv6lIGqWE7aHaA+phpJI8jNF/ER86KxG1oxP+iTEFm4ApuCrwl PFmKHkUUt4fzGtUWPBqJryrIr71Ejj35V4wSj6HPvCR9hZA1zmEQA0S7gDMdbHU3vl0qPGgGPXehW 0sQ+DWXa9yL4WnYu3Efg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shAzs-0000000DfSN-42x3; Thu, 22 Aug 2024 16:49:16 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shAxI-0000000Deg7-2VsX for linux-mtd@lists.infradead.org; Thu, 22 Aug 2024 16:46:38 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2f029e9c9cfso12339421fa.2 for ; Thu, 22 Aug 2024 09:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724345194; x=1724949994; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XfmAhjWG2sOwGq6j8+6XVe0OoaQ5ib14uvk/YZBFpuY=; b=MRSY2vCNGNuvcaQkqqCPhOa7IJLH/UKUI0RMJ2oGWVgxZphMK7EavrhLmZabIHchST ErTifn5DAxWIsXMqdnJPGKv3HfghhJgTbHKjcsMxKUfUiKdioa7pZjk4m0+Q2AwhIbUW TB3VdeRgemHarquraXPYSxw/wsTf9SK32LtJ/OJrqlsUDo7MII1muRovwV/bIzRYznbH 0d3nP2sAULJ0EnhzjFIHqk9Ck3QNQkXy/XYD9KrvPZTU7vbD2voMWOmKeL25kiuUboCQ RCrUfIP686h5O00bSbk9NQ+4N7txHNRK+BRrM51Q9Zqz1MrFOCs8PPXoWQsShKaD6Fxc Ah0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724345194; x=1724949994; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XfmAhjWG2sOwGq6j8+6XVe0OoaQ5ib14uvk/YZBFpuY=; b=jt4ci48/5OqFS3AzUyfJu374RD1588sz+w3pfudLfFgF0xxKc0ylypnIde3fvrmMHK BKwv88Iiznl183dCuH08BDMAmpT27LhqmxPOvV4JxyA7QcQ1VZaFIGFlnNDKkwPz3QUk WPEj/mNjhOh/5V1SphAZE/iSf94ogbl3y1C3x8qlo8ddrgbnvFbbRcBLqM5h3EWC7I8Z Hy0V0Ozt2LUwsug+/Mw+0YBq1WjzG6dX0pvLhkKDuSQ1CPzjCi6KEFE4AiJqXZvAhu+S iatYQLGqye0PdWfWzeo0TXYG6AUaP7T8XcuL8zzS3jtIYSV+Jd6TJIiaveYkxvstNuM9 lmNA== X-Forwarded-Encrypted: i=1; AJvYcCUBQiQE/HXn4JCO+0Hc4Pu8fQFbNRemxqyVTsLbg+Mp/Xj9Wnt4BMdEkZjMmvDFRaxQmZqmuKCIvO0=@lists.infradead.org X-Gm-Message-State: AOJu0Yx6xcDgAOEOQPxb5Nj7yZa1UyJnwcXprIVBGIELMtqMBMQjCUZ9 SZhYfEzxKpsBpABVt4xdlPsVswMiIbGPvu2HdeBJPy557cOd9RBd X-Google-Smtp-Source: AGHT+IF6GUoQW921ObHker7LldBOgNZ9yNjYnuSAy6U38EnS2MbSKP4J9uiayEbJDgQhtps2Tnm92Q== X-Received: by 2002:a2e:5152:0:b0:2ef:29cd:3191 with SMTP id 38308e7fff4ca-2f405ef037cmr20766221fa.35.1724345193572; Thu, 22 Aug 2024 09:46:33 -0700 (PDT) Received: from localhost (craw-09-b2-v4wan-169726-cust2117.vm24.cable.virginm.net. [92.238.24.70]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c0515a6342sm1110560a12.79.2024.08.22.09.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 09:46:33 -0700 (PDT) From: Colin Ian King To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] mtd: parsers: bcm47xxpart: make read-only array possible_nvram_sizes static const Date: Thu, 22 Aug 2024 17:46:32 +0100 Message-Id: <20240822164632.638171-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_094636_669376_5C57D106 X-CRM114-Status: GOOD ( 12.23 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Don't populate the read-only array possible_nvram_sizes on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King --- drivers/mtd/parsers/bcm47xxpart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [colin.i.king(at)gmail.com] -0.0 T_SCC_BODY_TEXT_LINE No description available. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:230 listed in] [list.dnswl.org] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Don't populate the read-only array possible_nvram_sizes on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King --- drivers/mtd/parsers/bcm47xxpart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/parsers/bcm47xxpart.c b/drivers/mtd/parsers/bcm47xxpart.c index 13daf9bffd08..49c8e7f27f21 100644 --- a/drivers/mtd/parsers/bcm47xxpart.c +++ b/drivers/mtd/parsers/bcm47xxpart.c @@ -95,7 +95,7 @@ static int bcm47xxpart_parse(struct mtd_info *master, uint32_t blocksize = master->erasesize; int trx_parts[2]; /* Array with indexes of TRX partitions */ int trx_num = 0; /* Number of found TRX partitions */ - int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, }; + static const int possible_nvram_sizes[] = { 0x8000, 0xF000, 0x10000, }; int err; /*