From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69A4927979A; Wed, 8 Apr 2026 18:38:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775673498; cv=none; b=e35NlHRU+bLeVZZhRNm3MoS4cjJRsdXqjyc/k0f+OckXMEB2bgfC4IMi66V/Z2in+Fp0dvi82pciaiZPOlPa8xI07UseOYM9pey5VpEUjr8JMfdjdwD5urmBVowZXb71L/wH59SD5ZOo+JqlGAXbFIkFinzde2VzIh7RYUDcWmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775673498; c=relaxed/simple; bh=hb6eajaFbcWIeCqR0vNZldRfhmoZzX7Cp4m5En8AnRY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FfH01jFkOshD1GzVmGNEgDo/9w4I1m/OFnNpNIp56EpVjLoyqjaaFBINUtrDD29svbi50E/CJgpFeB0UN9FUlXl2XsYeHMz8EkDNl05/a7u+aThTHK8FD9aVnPiVOoxNxkzDf44kPp944DzjzNJwfxflShp6OETp5UPLCWm+n5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cNYdAKx8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="cNYdAKx8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 003B6C19421; Wed, 8 Apr 2026 18:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775673498; bh=hb6eajaFbcWIeCqR0vNZldRfhmoZzX7Cp4m5En8AnRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cNYdAKx8umvtQQUNZatq8Dwhv3yADRkfN8Hqe6bzXhd3llDW3SK06Xw9xUlSanMwr Od4l90sM6QFslQczFb9SMeKY2j5Pp8Jk55i/XZyg8fbI0KNruxN6Bh4hVapCDnlMDY D0ndKxLgNAwF9GvZYWiwS+4S/3o+lOrXWKcIYYw0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christian Eggers , Fabio Estevam , Srinivas Kandagatla Subject: [PATCH 6.18 223/277] nvmem: imx: assign nvmem_cell_info::raw_len Date: Wed, 8 Apr 2026 20:03:28 +0200 Message-ID: <20260408175942.182939724@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408175933.836769063@linuxfoundation.org> References: <20260408175933.836769063@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christian Eggers commit 48b5163c957548f5854f14c90bfdedc33afbea3c upstream. Avoid getting error messages at startup like the following on i.MX6ULL: nvmem imx-ocotp0: cell mac-addr raw len 6 unaligned to nvmem word size 4 nvmem imx-ocotp0: cell mac-addr raw len 6 unaligned to nvmem word size 4 This shouldn't cause any functional change as this alignment would otherwise be done in nvmem_cell_info_to_nvmem_cell_entry_nodup(). Cc: stable@vger.kernel.org Fixes: 13bcd440f2ff ("nvmem: core: verify cell's raw_len") Signed-off-by: Christian Eggers Signed-off-by: Fabio Estevam Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20260327131645.3025781-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/nvmem/imx-ocotp-ele.c | 1 + drivers/nvmem/imx-ocotp.c | 1 + 2 files changed, 2 insertions(+) --- a/drivers/nvmem/imx-ocotp-ele.c +++ b/drivers/nvmem/imx-ocotp-ele.c @@ -131,6 +131,7 @@ static int imx_ocotp_cell_pp(void *conte static void imx_ocotp_fixup_dt_cell_info(struct nvmem_device *nvmem, struct nvmem_cell_info *cell) { + cell->raw_len = round_up(cell->bytes, 4); cell->read_post_process = imx_ocotp_cell_pp; } --- a/drivers/nvmem/imx-ocotp.c +++ b/drivers/nvmem/imx-ocotp.c @@ -589,6 +589,7 @@ MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids static void imx_ocotp_fixup_dt_cell_info(struct nvmem_device *nvmem, struct nvmem_cell_info *cell) { + cell->raw_len = round_up(cell->bytes, 4); cell->read_post_process = imx_ocotp_cell_pp; }