]> Gentwo Git Trees - linux/.git/commit
of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()
authorYuntao Wang <yuntao.wang@linux.dev>
Sat, 15 Nov 2025 13:47:49 +0000 (21:47 +0800)
committerRob Herring (Arm) <robh@kernel.org>
Thu, 20 Nov 2025 14:32:48 +0000 (08:32 -0600)
commitc85da64ce2c36bba469f6feede9ca768f0361741
tree8962317edf8c66c1d3f55281e6e7704683667da1
parent463942de13cd30fad5dba709f708483eab7efc2c
of/fdt: Fix incorrect use of dt_root_addr_cells in early_init_dt_check_kho()

When reading the fdt_size value, the argument passed to dt_mem_next_cell()
is dt_root_addr_cells, but it should be dt_root_size_cells.

The same issue occurs when reading the scratch_size value.

Use a helper function to simplify the code and fix these issues.

Fixes: 274cdcb1c004 ("arm64: add KHO support")
Signed-off-by: Yuntao Wang <yuntao.wang@linux.dev>
Link: https://patch.msgid.link/20251115134753.179931-5-yuntao.wang@linux.dev
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
drivers/of/fdt.c