]> www.infradead.org Git - users/jedix/linux-maple.git/commit
of: reserved-memory: Fix using wrong number of cells to get property 'alignment'
authorZijun Hu <quic_zijuhu@quicinc.com>
Thu, 9 Jan 2025 13:27:00 +0000 (21:27 +0800)
committerRob Herring (Arm) <robh@kernel.org>
Mon, 13 Jan 2025 23:47:29 +0000 (17:47 -0600)
commit267b21d0bef8e67dbe6c591c9991444e58237ec9
treec6df8e2d7125b9555c0bbe09c2165096e858647b
parent1734514560ad810352ab745b668330b85c0d4d40
of: reserved-memory: Fix using wrong number of cells to get property 'alignment'

According to DT spec, size of property 'alignment' is based on parent
node’s #size-cells property.

But __reserved_mem_alloc_size() wrongly uses @dt_root_addr_cells to get
the property obviously.

Fix by using @dt_root_size_cells instead of @dt_root_addr_cells.

Fixes: 3f0c82066448 ("drivers: of: add initialization code for dynamic reserved memory")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-9-db8a72415b8c@quicinc.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
drivers/of/of_reserved_mem.c