Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5742713iog; Thu, 23 Jun 2022 04:35:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uBN5doBHsxbwwU2LbfG6mucqIGT6VwdL7BhoqItmN9RPqil2ZR/SZpa6/qDVoEu+7J1X4b X-Received: by 2002:a17:907:da7:b0:722:dac3:13e0 with SMTP id go39-20020a1709070da700b00722dac313e0mr8100454ejc.337.1655984131219; Thu, 23 Jun 2022 04:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655984131; cv=none; d=google.com; s=arc-20160816; b=JuSUA0UXKbNvDs0tvhk8WF78x1RYadWi7ldjW0YTb+DXHW5wTr7b8luUwfmGQ4AF/x 8MH0tD1DjvI1sSrtpybATqxbWAr1E2u5GXjg66CUsj3chJjdFX1Ux06YSLnJKMIejmYH 6KR7Ub4hcz/jKUZ28qc5xK66d1wTo8Hz0HuuKms83QnpXP+fSMeSBeNSOsHLkK2MZNi4 Un9hW3m19f39QyfnR//lpzNnGgDJsJSBFgHIQZTudj7sl6zGIUe6T66rlzDQQ/IxLI+B /YTCGro2aZhNTn3ZS+z46QDCJqDPkaMkyseZqAv08TwWqN1HHlPH+ctkNbBChKMbqM3F q0fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=24+arAKJhTGIKfgrnJIiZ/9RG62zhef/20t26Jbq8Qs=; b=ZbqWteK5dLQvruRy8jRDrAj7teHEzQI0/2MYN63n6aZ4Rg9BsLL+bc+ni5H+BXl1E6 ry+7EmEzlTwEzJ5oYTlSzuTIiNzKAFgeiwUrNilbK0TY5g7NfMGONXkRMBJmtgJnb/vt FqXfPN3ZblCoby3ulf/B1HYbSRMa8h/miK1Gpm/xEA4RtHnhqgj929sPHSyTSJwNzt1p ANY+nKDcdwYr/7ZvZRX+fwswQTd3B2us3NieW+1cOBCl3DiL1E8ZbYdd16zhRrszZNRD yo3ci8Yxd/XDkg7tdW53CJwYZj9fuVbKr3o232yYAGL/hmfkIbD4IPCa3L5YAMs3VXIi MPog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TDYzkiRW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a056402281000b004357fc49fd6si17272522ede.113.2022.06.23.04.35.06; Thu, 23 Jun 2022 04:35:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TDYzkiRW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbiFWKwM (ORCPT + 99 others); Thu, 23 Jun 2022 06:52:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231381AbiFWKwC (ORCPT ); Thu, 23 Jun 2022 06:52:02 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D8EE4B42F; Thu, 23 Jun 2022 03:51:59 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id E13C4E001A; Thu, 23 Jun 2022 10:51:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1655981518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=24+arAKJhTGIKfgrnJIiZ/9RG62zhef/20t26Jbq8Qs=; b=TDYzkiRWBxX0NL8q0DTTu/8bOwxD73E83l+t8uMK1NtOHcvg5aNHsdlt+ChwGFVe5ekQ70 ewAkv+/eQPBqzptFi3nBa2+D1HR9EwElYSKzt9+PacPGvk50if3hGKeT49jE4EFBi/SGSV jqmkMocV4MAXRxVYGx4Br1tF9Vm7xiGQZHmuRHfsil107eESMUSoXJS//rC/XlyQUny/gQ 190kxwQSdbc20rjGOEMu5I9KGTCmLPkKW3joN8Y6BcpIm5rZd4yrbvGlxIiBmMqpWDtOXM R83MKOs8IkohWqBtNfnIdDE40DUPtbVf6DmtB3P1uuJ6CtPXg0tKWJqpkjBqGA== From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: Rob Herring , Frank Rowand Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Lizhi Hou , Allan Nielsen , Horatiu Vultur , Steen Hegelund , Thomas Petazzoni Subject: [PATCH v1 2/2] of: unittest: remove check for of_root Date: Thu, 23 Jun 2022 12:50:44 +0200 Message-Id: <20220623105044.152832-3-clement.leger@bootlin.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623105044.152832-1-clement.leger@bootlin.com> References: <20220623105044.152832-1-clement.leger@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that of_root node is always populated in of_core_init(), remove this manual tree creation and assume that the root node always exists. Signed-off-by: Clément Léger --- drivers/of/unittest.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 7f6bba18c515..a787d212c0f6 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1469,16 +1469,6 @@ static int __init unittest_data_add(void) return -EINVAL; } - if (!of_root) { - of_root = unittest_data_node; - for_each_of_allnodes(np) - __of_attach_node_sysfs(np); - of_aliases = of_find_node_by_path("/aliases"); - of_chosen = of_find_node_by_path("/chosen"); - of_overlay_mutex_unlock(); - return 0; - } - EXPECT_BEGIN(KERN_INFO, "Duplicate name in testcase-data, renamed to \"duplicate-name#1\""); -- 2.36.1