From patchwork Thu Jan 22 17:10:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 43541 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC233218DB for ; Thu, 22 Jan 2015 17:10:29 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf1743881lbd.3 for ; Thu, 22 Jan 2015 09:10:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=e3G2c+xpR9pWFsMtG9XEa+HvSJX7VHk5qyV9rpK+KDw=; b=KaMO1iMAzJ6hUKNyVS14Cb6uLEpEVk29Gb46BngvyBn+4p+Z1vHDQu5dWep3SBdTBU 1Zry8JgJK4PJ+E9GjYUrWhFX6iCUMwVbwwi4oFpktztE4204R37hD6PiAtf93AxREaoo Io2BFs7haKTY+PeceUmLflMR4Y5gyXmUzPQpDDoB2DGzlJ1dlPVscrXXty2PCa+pm9lB d7ah21uBhMlC1JGqhq062vQmDu9rNO1fWrvLepugMN5x0xfWvwR7o9u7QorNIehbUerc bWo82E6/9HooqShcZ051YM2JyFyrWTV5cz17zeMGOF24PinmxIlwD5b8Q8dZecg6wILt uq4g== X-Gm-Message-State: ALoCoQmgNyVNOcg+l9JvmO93/l2KvLBFOcNKFopp0SjwSFMN1KENZGIxAd4nx6yF4HlTCHU/qes6 X-Received: by 10.194.201.10 with SMTP id jw10mr405634wjc.3.1421946628703; Thu, 22 Jan 2015 09:10:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.201 with SMTP id x9ls213818lae.89.gmail; Thu, 22 Jan 2015 09:10:28 -0800 (PST) X-Received: by 10.152.205.75 with SMTP id le11mr2967483lac.20.1421946628511; Thu, 22 Jan 2015 09:10:28 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id f3si9039441lae.35.2015.01.22.09.10.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 09:10:28 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id 10so1517375lbg.6 for ; Thu, 22 Jan 2015 09:10:28 -0800 (PST) X-Received: by 10.112.84.225 with SMTP id c1mr2948048lbz.22.1421946628344; Thu, 22 Jan 2015 09:10:28 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp330927lbb; Thu, 22 Jan 2015 09:10:27 -0800 (PST) X-Received: by 10.70.22.164 with SMTP id e4mr4056589pdf.24.1421946626055; Thu, 22 Jan 2015 09:10:26 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fm4si13065611pac.172.2015.01.22.09.10.24; Thu, 22 Jan 2015 09:10:26 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754011AbbAVRKW (ORCPT + 28 others); Thu, 22 Jan 2015 12:10:22 -0500 Received: from mail-we0-f171.google.com ([74.125.82.171]:49315 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753420AbbAVRKT (ORCPT ); Thu, 22 Jan 2015 12:10:19 -0500 Received: by mail-we0-f171.google.com with SMTP id q58so3014386wes.2 for ; Thu, 22 Jan 2015 09:10:17 -0800 (PST) X-Received: by 10.194.2.34 with SMTP id 2mr5278064wjr.58.1421946617401; Thu, 22 Jan 2015 09:10:17 -0800 (PST) Received: from trevor.secretlab.ca (host81-159-185-229.range81-159.btcentralplus.com. [81.159.185.229]) by mx.google.com with ESMTPSA id dc1sm3771575wib.18.2015.01.22.09.10.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 09:10:16 -0800 (PST) Received: by trevor.secretlab.ca (Postfix, from userid 1000) id E4E70C40A80; Thu, 22 Jan 2015 17:10:14 +0000 (GMT) From: Grant Likely To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Grant Likely , Gaurav Minocha , Rob Herring Subject: [PATCH] of/unittest: Remove obsolete code Date: Thu, 22 Jan 2015 17:10:10 +0000 Message-Id: <1421946610-6609-1-git-send-email-grant.likely@linaro.org> X-Mailer: git-send-email 2.1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grant.likely@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit 3ce04b4a9, "Removes OF_UNITTEST dependency on OF_DYNAMIC config symbol" removes a bunch of code, but missed a few minor bits. Clean it up by removing the node removal cache and flag. Signed-off-by: Grant Likely Cc: Gaurav Minocha Cc: Rob Herring --- drivers/of/unittest.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 139363af5c88..7aa1d6dae5ba 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -27,11 +27,6 @@ static struct selftest_results { int failed; } selftest_results; -#define NO_OF_NODES 3 -static struct device_node *nodes[NO_OF_NODES]; -static int last_node_index; -static bool selftest_live_tree; - #define selftest(result, fmt, ...) ({ \ bool failed = !(result); \ if (failed) { \ @@ -830,13 +825,6 @@ static int attach_node_and_children(struct device_node *np) return 0; } - /* Children of the root need to be remembered for removal */ - if (np->parent == of_root) { - if (WARN_ON(last_node_index >= NO_OF_NODES)) - return -EINVAL; - nodes[last_node_index++] = np; - } - child = np->child; np->child = NULL; @@ -899,10 +887,7 @@ static int __init selftest_data_add(void) } if (!of_root) { - /* enabling flag for removing nodes */ - selftest_live_tree = true; of_root = selftest_data_node; - for_each_of_allnodes(np) __of_attach_node_sysfs(np); of_aliases = of_find_node_by_path("/aliases");