From nobody Mon Feb 9 05:52:38 2026 Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C1C423F42D for ; Wed, 12 Nov 2025 14:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762958263; cv=none; b=Bt6wjCLO6MHbvq7Ydf52E8UVUIEpZwmndv0KwrgKMo9TI6tx4Rf6kjiOTswhXM1TahHiwvcs3qYyotFr9ybN/EH31+K4oRYTSI028i9E2rUb5fRQIyBZtBI787sB+Z5BNQ18TpqeQLZ8dx5Y2m6zavOkDrhc4rMhk5RBeKbN9pI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762958263; c=relaxed/simple; bh=FnJNwjc+en5RS+JbzwPkobo8ZAzHwK/8ia5Eorc3bFg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qT5Y9OkaXZPOqstqgox4KHENwhONu1+J1RBiAgwhodDnGHhD1ea7YZVamgJhGtvWQb6tr8xCR5MBDvpsWbxyQx9I3uX1EgNxFZ8fkXSsCdDEzOAoGj8RjTkvW4XqoZUvQn4ojdRycnZZJKg9rMTno1HSVVaZLToihWD2oxsQ2jE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=GwVtWhnu; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="GwVtWhnu" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1762958259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4cbw0txGZgveQRmvE3BdA/66SsL3EqAhAgd0O+UFaEE=; b=GwVtWhnuB1vnkuqa+YuRpjhRHNurmeP4s4SumezLBIyG7Iz5N72RhZbKM8EilMaRZo+Y+N CZGRXHZB80AfyoP2pjHcdm3jIWNw6Jjg0tUZlj3irvmPYvR0JW1ub6399ci5a9h7C4kSto fMVVmXPjSSrqJWLCiFxm4DqflU02ujA= From: Yuntao Wang To: Rob Herring , Saravana Kannan Cc: Geert Uytterhoeven , Catalin Marinas , AKASHI Takahiro , James Morse , Chen Zhou , Baoquan He , Zhen Lei , Andrew Morton , Changyuan Lyu , Alexander Graf , "Mike Rapoport (Microsoft)" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Yuntao Wang Subject: [PATCH 03/10] of/reserved_mem: Use dt_root_addr_size_bytes() instead of open-coding it Date: Wed, 12 Nov 2025 22:35:13 +0800 Message-ID: <20251112143520.233870-4-yuntao.wang@linux.dev> In-Reply-To: <20251112143520.233870-1-yuntao.wang@linux.dev> References: <20251112143520.233870-1-yuntao.wang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Use dt_root_addr_size_bytes() instead of open-coding it in fdt_scan_reserved_mem_reg_nodes() to improve code maintainability. Signed-off-by: Yuntao Wang Reviewed-by: Geert Uytterhoeven --- drivers/of/of_reserved_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 67c0ccd373c2..0e6b0e7968a9 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -230,7 +230,7 @@ static void __init __rmem_check_for_overlap(void); */ void __init fdt_scan_reserved_mem_reg_nodes(void) { - int t_len =3D (dt_root_addr_cells + dt_root_size_cells) * sizeof(__be32); + int t_len =3D dt_root_addr_size_bytes(); const void *fdt =3D initial_boot_params; phys_addr_t base, size; const __be32 *prop; --=20 2.51.0