Skip to content

Commit 48b5163

Browse files
ceggers-arrigregkh
authored andcommitted
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: 13bcd44 ("nvmem: core: verify cell's raw_len") Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20260327131645.3025781-2-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6a50277 commit 48b5163

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/nvmem/imx-ocotp-ele.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ static int imx_ocotp_cell_pp(void *context, const char *id, int index,
131131
static void imx_ocotp_fixup_dt_cell_info(struct nvmem_device *nvmem,
132132
struct nvmem_cell_info *cell)
133133
{
134+
cell->raw_len = round_up(cell->bytes, 4);
134135
cell->read_post_process = imx_ocotp_cell_pp;
135136
}
136137

drivers/nvmem/imx-ocotp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ MODULE_DEVICE_TABLE(of, imx_ocotp_dt_ids);
589589
static void imx_ocotp_fixup_dt_cell_info(struct nvmem_device *nvmem,
590590
struct nvmem_cell_info *cell)
591591
{
592+
cell->raw_len = round_up(cell->bytes, 4);
592593
cell->read_post_process = imx_ocotp_cell_pp;
593594
}
594595

0 commit comments

Comments
 (0)