+11
−7
Loading
The len value is in bytes, while `dt_root_addr_cells + dt_root_size_cells` is in cells (4 bytes per cell). Modulo calculation between them is incorrect, the units must be converted first. Use helper functions to simplify the code and fix this issue. Fixes: fb319e77 ("of: fdt: Add memory for devices by DT property "linux,usable-memory-range"") Fixes: 2af2b50a ("of: fdt: Add generic support for handling usable memory range property") Fixes: 8f579b1c ("arm64: limit memory regions based on DT property, usable-memory-range") Signed-off-by:Yuntao Wang <yuntao.wang@linux.dev> Link: https://patch.msgid.link/20251115134753.179931-4-yuntao.wang@linux.dev Signed-off-by:
Rob Herring (Arm) <robh@kernel.org>