[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250109-of_core_fix-v4-12-db8a72415b8c@quicinc.com>
Date: Thu, 09 Jan 2025 21:27:03 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Rob Herring <robh@...nel.org>, Saravana Kannan <saravanak@...gle.com>,
Maxime Ripard <mripard@...nel.org>, Robin Murphy <robin.murphy@....com>,
Grant Likely <grant.likely@...retlab.ca>, Marc Zyngier <maz@...nel.org>,
Andreas Herrmann <andreas.herrmann@...xeda.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Catalin Marinas <catalin.marinas@....com>, Mike Rapoport <rppt@...nel.org>,
Oreoluwa Babatunde <quic_obabatun@...cinc.com>
Cc: Zijun Hu <zijun_hu@...oud.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH v4 12/14] of: reserved-memory: Move an assignment to
effective place in __reserved_mem_alloc_size()
From: Zijun Hu <quic_zijuhu@...cinc.com>
The assignment '@...e = 0' in __reserved_mem_alloc_size() is meaningless
since @base was already initialized to 0.
Move the assignment to effective and proper place.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
drivers/of/of_reserved_mem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index e2da88d7706ab3c208386e29f31350178e67cd14..75e819f66a56139a800dba5e2e0044d0bbeb065e 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -441,13 +441,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, const char *unam
return -EINVAL;
}
- base = 0;
-
while (len > 0) {
start = dt_mem_next_cell(dt_root_addr_cells, &prop);
end = start + dt_mem_next_cell(dt_root_size_cells,
&prop);
+ base = 0;
ret = __reserved_mem_alloc_in_range(size, align,
start, end, nomap, &base);
if (ret == 0) {
--
2.34.1
Powered by blists - more mailing lists