Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Johan Hovold and committed by
Georgi Djakov
7dcdad6f ac9a7868

+2 -58
+2 -50
drivers/interconnect/core.c
··· 587 587 588 588 /** 589 589 * icc_get_name() - Get name of the icc path 590 - * @path: reference to the path returned by icc_get() 590 + * @path: interconnect path 591 591 * 592 592 * This function is used by an interconnect consumer to get the name of the icc 593 593 * path. ··· 605 605 606 606 /** 607 607 * icc_set_bw() - set bandwidth constraints on an interconnect path 608 - * @path: reference to the path returned by icc_get() 608 + * @path: interconnect path 609 609 * @avg_bw: average bandwidth in kilobytes per second 610 610 * @peak_bw: peak bandwidth in kilobytes per second 611 611 * ··· 703 703 return __icc_enable(path, false); 704 704 } 705 705 EXPORT_SYMBOL_GPL(icc_disable); 706 - 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 706 755 707 /** 756 708 * icc_put() - release the reference to the icc_path
-8
include/linux/interconnect.h
··· 40 40 41 41 #if IS_ENABLED(CONFIG_INTERCONNECT) 42 42 43 - struct icc_path *icc_get(struct device *dev, const int src_id, 44 - const int dst_id); 45 43 struct icc_path *of_icc_get(struct device *dev, const char *name); 46 44 struct icc_path *devm_of_icc_get(struct device *dev, const char *name); 47 45 int devm_of_icc_bulk_get(struct device *dev, int num_paths, struct icc_bulk_data *paths); ··· 58 60 void icc_bulk_disable(int num_paths, const struct icc_bulk_data *paths); 59 61 60 62 #else 61 - 62 - static inline struct icc_path *icc_get(struct device *dev, const int src_id, 63 - const int dst_id) 64 - { 65 - return NULL; 66 - } 67 63 68 64 static inline struct icc_path *of_icc_get(struct device *dev, 69 65 const char *name)