[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250711120110.12885-2-ceggers@arri.de>
Date: Fri, 11 Jul 2025 13:55:47 +0200
From: Christian Eggers <ceggers@...i.de>
To: Srinivas Kandagatla <srini@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>, Dmitry Baryshkov <lumag@...nel.org>,
Rafał Miłecki <rafal@...ecki.pl>
CC: Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam
<festevam@...il.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Sasha
Levin" <sashal@...nel.org>, <imx@...ts.linux.dev>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
Christian Eggers <ceggers@...i.de>, <stable@...r.kernel.org>
Subject: [PATCH 1/2] nvmem: imx: assign nvmem_cell_info::raw_len
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().
Fixes: 4327479e559c ("nvmem: core: verify cell's raw_len")
Signed-off-by: Christian Eggers <ceggers@...i.de>
Cc: stable@...r.kernel.org
---
Tested on i.MX6ULL, but I assume that this is also required for
imx-ocotp-ele.c (i.MX93).
drivers/nvmem/imx-ocotp-ele.c | 1 +
drivers/nvmem/imx-ocotp.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index ca6dd71d8a2e..83617665c8d7 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -128,6 +128,7 @@ static int imx_ocotp_cell_pp(void *context, const char *id, int index,
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;
}
diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c
index 79dd4fda0329..22cc77908018 100644
--- a/drivers/nvmem/imx-ocotp.c
+++ b/drivers/nvmem/imx-ocotp.c
@@ -586,6 +586,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;
}
--
2.43.0
Powered by blists - more mailing lists