From patchwork Wed Dec 28 09:49:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 37160 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1807414wrt; Wed, 28 Dec 2022 01:52:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXvlLYFSJhgUFIy3Glqem6+8eo3hx8yphrqzD1nz6dBawbzt+b2q85lv2xS4DDShEkll+r6b X-Received: by 2002:a17:902:d905:b0:18d:6244:4676 with SMTP id c5-20020a170902d90500b0018d62444676mr27129153plz.18.1672221130873; Wed, 28 Dec 2022 01:52:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672221130; cv=none; d=google.com; s=arc-20160816; b=VT4TvKWYR/7k+G3ldDtff9BIQHPK6KBtbsJ1QJtFJO3heNA2UOZxqQRiZkH1fAH9Pn XKyiPNg8zxwoRKZFLFvDfn1nqUdomBva0sTvK6vx1cvG2C6DtFDEgGUS4YepTG/inkPO w+kvxKSGxSpkFDbqjfGFX8cuNhcMcmOnpE6IoPQKhcBeQeltZHgv7AktH6TVc2/JC7UC 0BJsHyWghMAe3/iBMa9oYL0S0PceP11rCJR6sdNBKtl3IRQGAm7mlhLID8dYP/HyV56n BHlzJ7NpelTtPXk9fIUaU66Dl7tC0wZ5+bMtWaTCLU+/289G1o8Wy5YsXoVpJHc8a1tf cjPg== 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=bYXP+VmoB4do3FEh5Gx/k8fGYrIwVyETQp3VFDb6CIA=; b=F8OAlRIsQPoFhCj0GRG8MutTE3YTYEOh202WSoQdX7EmfwyGrNmtscS2YGXN2vrb03 e/dEPrfhtCIYvSKwRr1RHcjEhrt5dIau3oDHxoVu2cCUUUNHCtyvmleMpm/Kds7LtO1K NI6dx/SgQnwZGpBBcxn2MmLB5NIXop8mAqiDDpDoiubfJOzfTPS3/2b9U7tUXa9yy/Oh Dz4Ux2r4qm3h2o9X3hJN8fZ70+NNgrUIsrFu+ypqgFW0A/xJX4rkv/IjX/dz0SuSpgGj xwNNwa/TaQWlpfhx9Hikh9kCEqyyYeWIefjEPWCo1shCKp3kdiDtxz4LDVWKt8Ysg9Oh 4bbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UZdhzyyH; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t10-20020a17090340ca00b0018690a76b7dsi16353878pld.359.2022.12.28.01.51.59; Wed, 28 Dec 2022 01:52:10 -0800 (PST) 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=@intel.com header.s=Intel header.b=UZdhzyyH; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232908AbiL1Jtd (ORCPT + 99 others); Wed, 28 Dec 2022 04:49:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232734AbiL1JtH (ORCPT ); Wed, 28 Dec 2022 04:49:07 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72C00F01B; Wed, 28 Dec 2022 01:49:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672220946; x=1703756946; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+ozAS6yksRC8a62UTirV31SEjQ8EBsV6SC/XfQ+AkkA=; b=UZdhzyyHMy/MsyrFmgyatPqdRrvUYqG6Rt4PTzzv9UJ7CcfKRa5mEEF0 UZXeNg8dUOPXS+ADr3EaQq2EeBVqXj3nm++cB6nhKrikcMjE/SpF1bXAS mK5b9YjBjdIuXHezjcaSSrKe53ZqN1xw7AMwPfebIQp0zLj/bZA0SUbwA 4+rymtiDmh1fmGaTfbOFIL0btXqNUWbn1w5dHkJGeli2v1qQ8GOa7cY+V 7nR587SpiWXvjO9GVDjBSzw47Jq7r7koSlkR407o+Eo/H0ZaufFHKXDnb k+tNjB4OOcaHZ1BoERJ6vKMwrTTbMU8bdlGdgLJeko1oHaGftFT4eMbd2 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="385266808" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="385266808" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2022 01:49:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="603291141" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="603291141" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 28 Dec 2022 01:49:00 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id E8B04220; Wed, 28 Dec 2022 11:49:31 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Sakari Ailus , Heikki Krogerus , Andy Shevchenko , Daniel Scally , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: "Rafael J. Wysocki" , Yong Zhi , Bingbu Cao , Tianshu Qiu , Mauro Carvalho Chehab , Daniel Scally Subject: [PATCH v3 4/4] software node: Remove unused APIs Date: Wed, 28 Dec 2022 11:49:22 +0200 Message-Id: <20221228094922.84119-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221228094922.84119-1-andriy.shevchenko@linux.intel.com> References: <20221228094922.84119-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753450944703175528?= X-GMAIL-MSGID: =?utf-8?q?1753450944703175528?= There are no more users of software_node_register_nodes() and software_node_unregister_nodes(). Remove them. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Acked-by: Sakari Ailus Tested-by: Daniel Scally Acked-by: Heikki Krogerus --- drivers/base/swnode.c | 61 ---------------------------------------- include/linux/property.h | 3 -- 2 files changed, 64 deletions(-) diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index 0a482212c7e8..da3c1c2cb9a8 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -819,67 +819,6 @@ swnode_register(const struct software_node *node, struct swnode *parent, return &swnode->fwnode; } -/** - * software_node_register_nodes - Register an array of software nodes - * @nodes: Zero terminated array of software nodes to be registered - * - * Register multiple software nodes at once. If any node in the array - * has its .parent pointer set (which can only be to another software_node), - * then its parent **must** have been registered before it is; either outside - * of this function or by ordering the array such that parent comes before - * child. - */ -int software_node_register_nodes(const struct software_node *nodes) -{ - int ret; - int i; - - for (i = 0; nodes[i].name; i++) { - const struct software_node *parent = nodes[i].parent; - - if (parent && !software_node_to_swnode(parent)) { - ret = -EINVAL; - goto err_unregister_nodes; - } - - ret = software_node_register(&nodes[i]); - if (ret) - goto err_unregister_nodes; - } - - return 0; - -err_unregister_nodes: - software_node_unregister_nodes(nodes); - return ret; -} -EXPORT_SYMBOL_GPL(software_node_register_nodes); - -/** - * software_node_unregister_nodes - Unregister an array of software nodes - * @nodes: Zero terminated array of software nodes to be unregistered - * - * Unregister multiple software nodes at once. If parent pointers are set up - * in any of the software nodes then the array **must** be ordered such that - * parents come before their children. - * - * NOTE: If you are uncertain whether the array is ordered such that - * parents will be unregistered before their children, it is wiser to - * remove the nodes individually, in the correct order (child before - * parent). - */ -void software_node_unregister_nodes(const struct software_node *nodes) -{ - unsigned int i = 0; - - while (nodes[i].name) - i++; - - while (i--) - software_node_unregister(&nodes[i]); -} -EXPORT_SYMBOL_GPL(software_node_unregister_nodes); - /** * software_node_register_node_group - Register a group of software nodes * @node_group: NULL terminated array of software node pointers to be registered diff --git a/include/linux/property.h b/include/linux/property.h index 37179e3abad5..1ffd4f9bb67b 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -486,9 +486,6 @@ const struct software_node * software_node_find_by_name(const struct software_node *parent, const char *name); -int software_node_register_nodes(const struct software_node *nodes); -void software_node_unregister_nodes(const struct software_node *nodes); - int software_node_register_node_group(const struct software_node **node_group); void software_node_unregister_node_group(const struct software_node **node_group);