Skip to content

Commit 7dcdad6

Browse files
jhovoldGeorgi Djakov
authored andcommitted
interconnect: drop unused icc_get() interface
The icc_get() interface can be used to lookup an interconnect path based on global node ids. There has never been any users of this interface and all lookups are currently done from the devicetree. Remove the unused icc_get() interface. Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230523095248.25211-1-johan+linaro@kernel.org Signed-off-by: Georgi Djakov <djakov@kernel.org>
1 parent ac9a786 commit 7dcdad6

2 files changed

Lines changed: 2 additions & 58 deletions

File tree

drivers/interconnect/core.c

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ EXPORT_SYMBOL_GPL(icc_set_tag);
587587

588588
/**
589589
* icc_get_name() - Get name of the icc path
590-
* @path: reference to the path returned by icc_get()
590+
* @path: interconnect path
591591
*
592592
* This function is used by an interconnect consumer to get the name of the icc
593593
* path.
@@ -605,7 +605,7 @@ EXPORT_SYMBOL_GPL(icc_get_name);
605605

606606
/**
607607
* icc_set_bw() - set bandwidth constraints on an interconnect path
608-
* @path: reference to the path returned by icc_get()
608+
* @path: interconnect path
609609
* @avg_bw: average bandwidth in kilobytes per second
610610
* @peak_bw: peak bandwidth in kilobytes per second
611611
*
@@ -704,54 +704,6 @@ int icc_disable(struct icc_path *path)
704704
}
705705
EXPORT_SYMBOL_GPL(icc_disable);
706706

707-
/**
708-
* icc_get() - return a handle for path between two endpoints
709-
* @dev: the device requesting the path
710-
* @src_id: source device port id
711-
* @dst_id: destination device port id
712-
*
713-
* This function will search for a path between two endpoints and return an
714-
* icc_path handle on success. Use icc_put() to release
715-
* constraints when they are not needed anymore.
716-
* If the interconnect API is disabled, NULL is returned and the consumer
717-
* drivers will still build. Drivers are free to handle this specifically,
718-
* but they don't have to.
719-
*
720-
* Return: icc_path pointer on success, ERR_PTR() on error or NULL if the
721-
* interconnect API is disabled.
722-
*/
723-
struct icc_path *icc_get(struct device *dev, const int src_id, const int dst_id)
724-
{
725-
struct icc_node *src, *dst;
726-
struct icc_path *path = ERR_PTR(-EPROBE_DEFER);
727-
728-
mutex_lock(&icc_lock);
729-
730-
src = node_find(src_id);
731-
if (!src)
732-
goto out;
733-
734-
dst = node_find(dst_id);
735-
if (!dst)
736-
goto out;
737-
738-
path = path_find(dev, src, dst);
739-
if (IS_ERR(path)) {
740-
dev_err(dev, "%s: invalid path=%ld\n", __func__, PTR_ERR(path));
741-
goto out;
742-
}
743-
744-
path->name = kasprintf(GFP_KERNEL, "%s-%s", src->name, dst->name);
745-
if (!path->name) {
746-
kfree(path);
747-
path = ERR_PTR(-ENOMEM);
748-
}
749-
out:
750-
mutex_unlock(&icc_lock);
751-
return path;
752-
}
753-
EXPORT_SYMBOL_GPL(icc_get);
754-
755707
/**
756708
* icc_put() - release the reference to the icc_path
757709
* @path: interconnect path

include/linux/interconnect.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ struct icc_bulk_data {
4040

4141
#if IS_ENABLED(CONFIG_INTERCONNECT)
4242

43-
struct icc_path *icc_get(struct device *dev, const int src_id,
44-
const int dst_id);
4543
struct icc_path *of_icc_get(struct device *dev, const char *name);
4644
struct icc_path *devm_of_icc_get(struct device *dev, const char *name);
4745
int devm_of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths);
@@ -61,12 +59,6 @@ void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths);
6159

6260
#else
6361

64-
static inline struct icc_path *icc_get(struct device *dev, const int src_id,
65-
const int dst_id)
66-
{
67-
return NULL;
68-
}
69-
7062
static inline struct icc_path *of_icc_get(struct device *dev,
7163
const char *name)
7264
{

0 commit comments

Comments
 (0)