From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Clément Léger" <clement.leger@bootlin.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Daniel Scally" <djrscally@gmail.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Hans de Goede" <hdegoede@redhat.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Yong Zhi <yong.zhi@intel.com>, Bingbu Cao <bingbu.cao@intel.com>,
Tianshu Qiu <tian.shu.qiu@intel.com>,
Daniel Scally <dan.scally@ideasonboard.com>
Subject: [PATCH v2 4/4] software node: Remove unused APIs
Date: Mon, 21 Nov 2022 17:27:04 +0200 [thread overview]
Message-ID: <20221121152704.30180-4-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20221121152704.30180-1-andriy.shevchenko@linux.intel.com>
There are no more users of software_node_register_nodes() and
software_node_unregister_nodes(). Remove them.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
v2: added tags (Heikki, Daniel)
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 5d840299146d..6870abe12dc5 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -492,9 +492,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);
--
2.35.1
next prev parent reply other threads:[~2022-11-21 15:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 15:27 [PATCH v2 1/4] media: ipu3-cio2: Don't dereference fwnode handle Andy Shevchenko
2022-11-21 15:27 ` [PATCH v2 2/4] media: ipu3-cio2: Convert to use software_node_register_node_group() Andy Shevchenko
2022-11-21 15:27 ` [PATCH v2 3/4] software node: Switch property entry test to a new API Andy Shevchenko
2022-11-21 15:27 ` Andy Shevchenko [this message]
2022-11-23 18:01 ` [PATCH v2 1/4] media: ipu3-cio2: Don't dereference fwnode handle Andy Shevchenko
2022-11-23 19:10 ` Andy Shevchenko
2022-12-07 9:02 ` Sakari Ailus
2022-12-07 9:53 ` Andy Shevchenko
2022-12-07 14:00 ` Sakari Ailus
2022-12-08 10:35 ` Petr Mladek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221121152704.30180-4-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=clement.leger@bootlin.com \
--cc=dan.scally@ideasonboard.com \
--cc=djrscally@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=yong.zhi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).