From: linux@treblig.org
To: andriy.shevchenko@linux.intel.com, djrscally@gmail.com,
heikki.krogerus@linux.intel.com, sakari.ailus@linux.intel.com,
rafael@kernel.org
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH] device: property: Remove deadcode
Date: Sat, 16 Nov 2024 00:32:53 +0000 [thread overview]
Message-ID: <20241116003253.335337-1-linux@treblig.org> (raw)
From: "Dr. David Alan Gilbert" <linux@treblig.org>
fwnode_graph_get_endpoint_count() was added in 2021 by
commit c87b8fc56966 ("device property: Implement
fwnode_graph_get_endpoint_count()")
but has never been used.
fwnode_graph_get_remote_port() has been unused since 2017's
commit 6a71d8d77795 ("device property: Add fwnode_graph_get_port_parent")
Remove them.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/base/property.c | 41 ----------------------------------------
include/linux/property.h | 4 ----
2 files changed, 45 deletions(-)
diff --git a/drivers/base/property.c b/drivers/base/property.c
index 837d77e3af2b..0cf8a7afaaee 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -1116,22 +1116,6 @@ fwnode_graph_get_remote_port_parent(const struct fwnode_handle *fwnode)
}
EXPORT_SYMBOL_GPL(fwnode_graph_get_remote_port_parent);
-/**
- * fwnode_graph_get_remote_port - Return fwnode of a remote port
- * @fwnode: Endpoint firmware node pointing to the remote endpoint
- *
- * Extracts firmware node of a remote port the @fwnode points to.
- *
- * The caller is responsible for calling fwnode_handle_put() on the returned
- * fwnode pointer.
- */
-struct fwnode_handle *
-fwnode_graph_get_remote_port(const struct fwnode_handle *fwnode)
-{
- return fwnode_get_next_parent(fwnode_graph_get_remote_endpoint(fwnode));
-}
-EXPORT_SYMBOL_GPL(fwnode_graph_get_remote_port);
-
/**
* fwnode_graph_get_remote_endpoint - Return fwnode of a remote endpoint
* @fwnode: Endpoint firmware node pointing to the remote endpoint
@@ -1227,31 +1211,6 @@ fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode,
}
EXPORT_SYMBOL_GPL(fwnode_graph_get_endpoint_by_id);
-/**
- * fwnode_graph_get_endpoint_count - Count endpoints on a device node
- * @fwnode: The node related to a device
- * @flags: fwnode lookup flags
- * Count endpoints in a device node.
- *
- * If FWNODE_GRAPH_DEVICE_DISABLED flag is specified, also unconnected endpoints
- * and endpoints connected to disabled devices are counted.
- */
-unsigned int fwnode_graph_get_endpoint_count(const struct fwnode_handle *fwnode,
- unsigned long flags)
-{
- struct fwnode_handle *ep;
- unsigned int count = 0;
-
- fwnode_graph_for_each_endpoint(fwnode, ep) {
- if (flags & FWNODE_GRAPH_DEVICE_DISABLED ||
- fwnode_graph_remote_available(ep))
- count++;
- }
-
- return count;
-}
-EXPORT_SYMBOL_GPL(fwnode_graph_get_endpoint_count);
-
/**
* fwnode_graph_parse_endpoint - parse common endpoint node properties
* @fwnode: pointer to endpoint fwnode_handle
diff --git a/include/linux/property.h b/include/linux/property.h
index 61fc20e5f81f..4301f5130280 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -470,8 +470,6 @@ struct fwnode_handle *
fwnode_graph_get_port_parent(const struct fwnode_handle *fwnode);
struct fwnode_handle *fwnode_graph_get_remote_port_parent(
const struct fwnode_handle *fwnode);
-struct fwnode_handle *fwnode_graph_get_remote_port(
- const struct fwnode_handle *fwnode);
struct fwnode_handle *fwnode_graph_get_remote_endpoint(
const struct fwnode_handle *fwnode);
@@ -497,8 +495,6 @@ static inline bool fwnode_graph_is_endpoint(const struct fwnode_handle *fwnode)
struct fwnode_handle *
fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode,
u32 port, u32 endpoint, unsigned long flags);
-unsigned int fwnode_graph_get_endpoint_count(const struct fwnode_handle *fwnode,
- unsigned long flags);
#define fwnode_graph_for_each_endpoint(fwnode, child) \
for (child = fwnode_graph_get_next_endpoint(fwnode, NULL); child; \
--
2.47.0
next reply other threads:[~2024-11-16 0:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 0:32 linux [this message]
2024-11-18 8:54 ` [PATCH] device: property: Remove deadcode Sakari Ailus
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=20241116003253.335337-1-linux@treblig.org \
--to=linux@treblig.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.