Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp777499lqc; Fri, 8 Mar 2024 11:14:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWHk5ly1Pl+svah/BSlIF0st8iF7au3TANiV3PU0szgSL4azI6rsSNLRbBLWEfx1f+2Mq0WRkKrUR1pms0M0woZufdJ+hBkwwBZFWwkYg== X-Google-Smtp-Source: AGHT+IHGR/6Vm68GGRjvb0y0QFk3j1jtGAHdRsl5mnUWQ/jLkRFG1/Qj2z0vDZ8n/c+U9QwObU5S X-Received: by 2002:a05:6a20:b3a7:b0:1a1:4ca0:26c7 with SMTP id eg39-20020a056a20b3a700b001a14ca026c7mr10062250pzb.60.1709925253647; Fri, 08 Mar 2024 11:14:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709925253; cv=pass; d=google.com; s=arc-20160816; b=sD9INtHgHsQnnDdOqR2upMyDJ3HD7PbgzHsZfbfl+L6BynU39ShNpFFdlC5xGvCTK5 yax1qYlor/ZvuGppfiVHHD89hXlkp+O+lrGTp8PEvWdpHrBy5YWLND/4NdYE9Cr7gKY2 fX+OuFf1il6/+ckpJEjCYkbbmNHFK9eqxB4W1NtvMYiLGsrTsljSyDOApkNAQdilDCfL P6H4YcVlcfklx6AV3xzirW8XLnzPXSlw7kMjAUENtw1Zo2DGWZJmgCqPw+D6/4H+q1Pe aXoOjW6DT2obkSiSU1ETfP9Hv1yb9tQ9azdFg9ecQA6+sdWLIUgN5vzu8eSZhUHurcUx jDQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=YWKo5hfeN1dHC2eJBtj7dn2Dw/vycuIkLhqrLxET/j0=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=SBVog8uSZOFgbTM0pIFv+/fyo3l/GJ77WeJe+T+4ESDlpZ+AN+vZeagvAn2VjOPk9q xfZNtqtpFSbNNY+pILU/DSyUjXihfhmCAzuDJCuZQ1yAi6f+tCspSelY1zRYxlJhhd2S LPJ4ItqWFVEiMf/7D2yyBr1ngrO1oOfmUcPQLPkffICvdRy2sN8Mnr5SIpDU61gnM0GG qyyCcypyqWzeT52je3AgwAIxVTqFpwfBEeY1sMIdWV0iAMRLNWKWkYIJTuhATSiaO01B sSsbqMllIIUx9Ku7L+OYdZ5ex+HQgmCBRGssGBh9LNDscxJ7D4pZqoAX0jxAg5YE88/d ILDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VlNcHMWz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-97499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u17-20020a056a00125100b006e54b982712si66769pfi.174.2024.03.08.11.14.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 11:14:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VlNcHMWz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-97499-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id AFC52B218E9 for ; Fri, 8 Mar 2024 19:14:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAC485B5D6; Fri, 8 Mar 2024 19:13:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="VlNcHMWz" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 352355A7B5; Fri, 8 Mar 2024 19:13:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709925219; cv=none; b=DWD17QZYH11nfJfGKM9n+r3odSWppDpl7Rmh4W+YfXweTZ6rKVbWPV80Mg2fQJLCG16S7S/AfHiAPYsYFMlqfWUjapAoe0emYRMpzCs5w1wBkR2i/Rew5J29TKmcXdNGN+LRmbEm9kMDCBapPCCQtswamtA3claXdv0aFZ4riYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709925219; c=relaxed/simple; bh=ZBg0ATi8Ky7Xe/2ClyJLKrSdZy4GBkPxIy69sV6PcwY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=A7vZIdyyZYfy9kcMmlsrlk7U5WWOmQEnvaYN2etqwK6YsB28GDc0XZgZxeNzhOQVxegtCemhDUbAkX50Ss8Ek5Hbe64t8MKSB4kePvMMYpa8zsvmqIkOdfWBXBBldcWrhF2IabGHjrHStHxFLXoPs+6YMsH+FIR4GwKF7o7cfR0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=VlNcHMWz; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 428Ia6Lk014709; Fri, 8 Mar 2024 19:12:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=YWKo5hfeN1dHC2eJBtj7dn2Dw/vycuIkLhqrLxET/j0=; b=Vl NcHMWzhnGRw3cPapHCmd05saOgxIjNI4gguOzHs+BkP+PMjN2gy0LDMPMuAcxm1k DAeYZHE7xFaAHTeYLy9ECHFq6Xl7/BbPxiT3A2wrxR7p7iezXg56kc0htdaEIcIy MT0klI+jhBgwml13uz7Ots9xGmSBF4Eh1e6B2H2HmRAD7MyPM0wrLgBVo6vS8azV ShX3vCP2OagrF6giQEbYwCWrtR+dBMpWJxhJtXMiGVj/ef9mK03phf7pwno1rpxh rV9idPLzvPf/nT5C9I5Rtb6JnpVrTUlxO7+F+qj5PZrsLk2WG/Q4b9nQq0AYlLkX l7hCBx3CjWdPIGfOj/qg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wr82x02x9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 19:12:30 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 428JCT1w005678 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 8 Mar 2024 19:12:29 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 8 Mar 2024 11:12:26 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH v4 4/4] of: reserved_mem: Rename fdt_* functions to refelct use of unflatten_devicetree APIs Date: Fri, 8 Mar 2024 11:12:04 -0800 Message-ID: <20240308191204.819487-5-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240308191204.819487-1-quic_obabatun@quicinc.com> References: <20240308191204.819487-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 5MueeBaeKBGY6HLUZEinlb4jupVVyEx9 X-Proofpoint-GUID: 5MueeBaeKBGY6HLUZEinlb4jupVVyEx9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 phishscore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=828 lowpriorityscore=0 mlxscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403080152 Rename the relevant fdt_* functions to a new naming scheme, dt_*, to reflect the use of the unflatten_devicetree APIs to scan through the reserved memory regions defined in the DT. Signed-off-by: Oreoluwa Babatunde --- drivers/of/fdt.c | 2 +- drivers/of/of_private.h | 4 ++-- drivers/of/of_reserved_mem.c | 14 +++++++------- include/linux/of_reserved_mem.h | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 11630eba965c..e51bb3aa782b 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1355,7 +1355,7 @@ void __init unflatten_device_tree(void) of_alias_scan(early_init_dt_alloc_memory_arch); unittest_unflatten_overlay_base(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); } /** diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index aa8844318257..8970948e10d4 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -177,7 +177,7 @@ static inline struct device_node *__of_get_dma_parent(const struct device_node * } #endif -void fdt_reserved_mem_save_node(struct device_node *node, const char *uname, - phys_addr_t base, phys_addr_t size); +void dt_reserved_mem_save_node(struct device_node *node, const char *uname, + phys_addr_t base, phys_addr_t size); #endif /* _LINUX_OF_PRIVATE_H */ diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 8d50a5178440..7d154d188a74 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -147,15 +147,15 @@ static void __init dt_scan_reserved_mem_reg_nodes(void) size = dt_mem_next_cell(dt_root_size_cells, &prop); if (size) - fdt_reserved_mem_save_node(child, uname, base, size); + dt_reserved_mem_save_node(child, uname, base, size); } } /* - * fdt_reserved_mem_save_node() - save fdt node for second pass initialization + * dt_reserved_mem_save_node() - save dt node for second pass initialization */ -void __init fdt_reserved_mem_save_node(struct device_node *node, const char *uname, - phys_addr_t base, phys_addr_t size) +void __init dt_reserved_mem_save_node(struct device_node *node, const char *uname, + phys_addr_t base, phys_addr_t size) { struct reserved_mem *rmem = &reserved_mem[reserved_mem_count]; @@ -307,7 +307,7 @@ int __init __reserved_mem_alloc_size(unsigned long node, const char *uname) uname, (unsigned long)(size / SZ_1M)); return -ENOMEM; } - fdt_reserved_mem_save_node(NULL, uname, base, size); + dt_reserved_mem_save_node(NULL, uname, base, size); return 0; } @@ -391,9 +391,9 @@ static void __init __rmem_check_for_overlap(void) } /** - * fdt_init_reserved_mem() - allocate and init all saved reserved memory regions + * dt_init_reserved_mem() - allocate and init all saved reserved memory regions */ -void __init fdt_init_reserved_mem(void) +void __init dt_init_reserved_mem(void) { int i, ret; diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index e92babd669c2..dd67b9b2488e 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h @@ -32,7 +32,7 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); #define RESERVEDMEM_OF_DECLARE(name, compat, init) \ _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) -void fdt_init_reserved_mem(void); +void dt_init_reserved_mem(void); int of_reserved_mem_device_init_by_idx(struct device *dev, struct device_node *np, int idx); int of_reserved_mem_device_init_by_name(struct device *dev, @@ -47,7 +47,7 @@ struct reserved_mem *of_reserved_mem_lookup(struct device_node *np); #define RESERVEDMEM_OF_DECLARE(name, compat, init) \ _OF_DECLARE_STUB(reservedmem, name, compat, init, reservedmem_of_init_fn) -static inline void fdt_init_reserved_mem(void) { } +static inline void dt_init_reserved_mem(void) { } static inline int of_reserved_mem_device_init_by_idx(struct device *dev, struct device_node *np, int idx) -- 2.34.1