[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] dt-overlay: Remove ASSERT_UNREACHABLE from add_nodes()
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Thu, 19 Sep 2024 12:42:37 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bu105dDIpB4eZMz42pqaBoX0Nyrbf+DW33CIprSzLCw=; b=WT9bp+3u1P9EbQuSHeZMFMSx5c4s3lPpiKprBfTevdMtXCUcGtYMsDkFAasSC3s3cMmpOMJIsHMXJWA+ViSVkHGg/pSPviSmulZODnT6ioqxPp98ZMz6RpkQuxKv/WZ8io8HqZM1/C7pAMmkRF3gLaYN3xL+vzIpOLe1aB5BaphhD39OoEGzneAVfQdXwYLzZjMSihaGBhQimJyJSAqOFgI9BMjAw6ayiY78TxFid/Inb3MNqC17sdNSz/L5+1UzL49+Pm11QiJ0zcOCGvRnFaCn9DVBqrwKoaqfva5ATPGpM+BnjInlAMMnWmE6V/bkG6UFxp3IVo5cALLo/Q9qmQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RyKAfJat7D7YOTM5FsNmWSPdM5e8Q1zZkdhg/MA1QTfkH5Xa+GNJKQhhhDOx5cpK2juISO1cR4s5hWwoTt8KaIVFAdfdoVpNckiHoDsHhqOtDtPhVg9suJqYWMzPK0URBRWrSsuTqxiuoq6thELBwYGzXUiWOVjysiJ6zT9PJYFFEfkvO1gGwcQbsrfR/n59+Iq9wgMFJR4rxW3GGaZJCWHydfi3C2T7yDterLAnpbPP0ttUyImzFsLZqDFYgaX3Rqly15sgCnCUZDrhS9bB4qDZRJH+EeRaZDsArZdHsQA832Z+n5lmP9uxM4gR//NwgvCb+gOFTMZ+ydK6srgbmw==
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
- Delivery-date: Thu, 19 Sep 2024 10:45:33 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
The assumption stated in the comment that the code will never get there
is incorrect. It's enough for the target-path to be incorrect (i.e. user
error), which will lead to an incorrect overall node path and we will end
up in this "unreachable" place causing a failure in debug builds.
Fixes: 0c0facdab6f5 ("xen/arm: Implement device tree node addition
functionalities")
Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
xen/common/dt-overlay.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/xen/common/dt-overlay.c b/xen/common/dt-overlay.c
index 8606b14d1e8e..d18bd12bd38d 100644
--- a/xen/common/dt-overlay.c
+++ b/xen/common/dt-overlay.c
@@ -596,11 +596,7 @@ static long add_nodes(struct overlay_track *tr, char
**nodes_full_path)
overlay_node = dt_find_node_by_path_from(tr->dt_host_new,
nodes_full_path[j]);
if ( overlay_node == NULL )
- {
- /* Sanity check. But code will never come here. */
- ASSERT_UNREACHABLE();
return -EFAULT;
- }
/*
* Find previous and next node to overlay_node in dt_host_new. We will
--
2.37.6
|