public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvmem: imx: assign nvmem_cell_info::raw_len
@ 2026-03-06 14:22 Fabio Estevam
  2026-03-11  7:37 ` Srinivas Kandagatla
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2026-03-06 14:22 UTC (permalink / raw)
  To: srini
  Cc: imx, linux-arm-kernel, linux-kernel, Christian Eggers, stable,
	Fabio Estevam

From: Christian Eggers <ceggers@arri.de>

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: 4327479e559c ("nvmem: core: verify cell's raw_len")
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 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 7807ec0e2d18..4585da51f7f4 100644
--- 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 *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 7bf7656d4f96..108d78d7f6cb 100644
--- 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;
 }
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvmem: imx: assign nvmem_cell_info::raw_len
  2026-03-06 14:22 [PATCH] nvmem: imx: assign nvmem_cell_info::raw_len Fabio Estevam
@ 2026-03-11  7:37 ` Srinivas Kandagatla
  0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Kandagatla @ 2026-03-11  7:37 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: imx, linux-arm-kernel, linux-kernel, Christian Eggers, stable


On Fri, 06 Mar 2026 11:22:35 -0300, Fabio Estevam wrote:
> 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().
> 
> [...]

Applied, thanks!

[1/1] nvmem: imx: assign nvmem_cell_info::raw_len
      commit: 70557835f9d310767e1af4522af59ad0aadc1ce1

Best regards,
-- 
Srinivas Kandagatla <srini@kernel.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-11  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 14:22 [PATCH] nvmem: imx: assign nvmem_cell_info::raw_len Fabio Estevam
2026-03-11  7:37 ` Srinivas Kandagatla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox