Commit 48b5163c authored by Christian Eggers's avatar Christian Eggers Committed by Greg Kroah-Hartman
Browse files

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().

Cc: stable@vger.kernel.org
Fixes: 13bcd440 ("nvmem: core: verify cell's raw_len")
Signed-off-by: default avatarChristian Eggers <ceggers@arri.de>
Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Signed-off-by: default avatarSrinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20260327131645.3025781-2-srini@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a502776
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
}

+1 −0
Original line number Diff line number Diff line
@@ -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;
}