From nobody Mon Feb 9 03:10:55 2026 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 2059C2BF3C5 for ; Wed, 12 Nov 2025 14:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762958255; cv=none; b=W83wdjLzVsVEbEBwSBacL5+Hk7cx8o8ZL5GApAzn2o/xcnatbGiJCNAPhQ4K54IUafBFmj8LP9rC2CpIY7jMszv4HQVKkGs/jWIr0Np+6+hyKnsg4OvAcCXiKzcNIIJDCrmkOI7PS6yjTkhgZ4o/E0YGUYDf6/2luxNZrgGap3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762958255; c=relaxed/simple; bh=KUaz13UbB8OLq6l6G6TlNd70ET1Mwc3jEJ9+JWehkF4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JqMow8PUzrgNpPJoM8m8AFbRq6PiDSCTDKaY9xoBfhR6dX6mUGEOd3IQJEj1AnA4nvthPdmd5iAzwPAqMkT43GPo5G+eS2HWSNBgSv8OgvHSQAK8JNIXQETm+PZ2fuYlxSaYI/GfNQtaenE+4GVPLK4e6w6hY/zaI3K6n/06tug= 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=q3AVVszw; arc=none smtp.client-ip=91.218.175.170 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="q3AVVszw" 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=1762958249; 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=yc0kfV4r2fjRhsZWr3QexNqNjpEEGyKvB/5qZrt2EqI=; b=q3AVVszw+CsNEAzTfDTqAqwC0WCG+jlFDQpeXJ2Iom2XfAflgrIhZLRl/DRCM8q4PPds8V rU18Fr0z/MqW7Z+vltFQtdzFO+hF8CR/MGIa9oA09+tCMcmS1NnOEmgd477v2C2WV6qpJ3 65a5MCWu2/Y2LJ6IraSzsPHrUxObojE= 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 02/10] of/reserved_mem: Use dt_root_addr_size_bytes() instead of open-coding it Date: Wed, 12 Nov 2025 22:35:12 +0800 Message-ID: <20251112143520.233870-3-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 __reserved_mem_reserve_reg() 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 2e9ea751ed2d..67c0ccd373c2 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -154,7 +154,7 @@ static int __init early_init_dt_reserve_memory(phys_add= r_t base, static int __init __reserved_mem_reserve_reg(unsigned long node, const char *uname) { - int t_len =3D (dt_root_addr_cells + dt_root_size_cells) * sizeof(__be32); + int t_len =3D dt_root_addr_size_bytes(); phys_addr_t base, size; int len; const __be32 *prop; --=20 2.51.0