Commit 680f8666 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Georgi Djakov

interconnect: Make icc_provider_del() return void

All users ignore the return value of icc_provider_del(). Consequently
make it not return an error code.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220718121409.171773-8-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarGeorgi Djakov <djakov@kernel.org>
parent fa80a299
...@@ -1057,29 +1057,25 @@ EXPORT_SYMBOL_GPL(icc_provider_add); ...@@ -1057,29 +1057,25 @@ EXPORT_SYMBOL_GPL(icc_provider_add);
/** /**
* icc_provider_del() - delete previously added interconnect provider * icc_provider_del() - delete previously added interconnect provider
* @provider: the interconnect provider that will be removed from topology * @provider: the interconnect provider that will be removed from topology
*
* Return: 0 on success, or an error code otherwise
*/ */
int icc_provider_del(struct icc_provider *provider) void icc_provider_del(struct icc_provider *provider)
{ {
mutex_lock(&icc_lock); mutex_lock(&icc_lock);
if (provider->users) { if (provider->users) {
pr_warn("interconnect provider still has %d users\n", pr_warn("interconnect provider still has %d users\n",
provider->users); provider->users);
mutex_unlock(&icc_lock); mutex_unlock(&icc_lock);
return -EBUSY; return;
} }
if (!list_empty(&provider->nodes)) { if (!list_empty(&provider->nodes)) {
pr_warn("interconnect provider still has nodes\n"); pr_warn("interconnect provider still has nodes\n");
mutex_unlock(&icc_lock); mutex_unlock(&icc_lock);
return -EBUSY; return;
} }
list_del(&provider->provider_list); list_del(&provider->provider_list);
mutex_unlock(&icc_lock); mutex_unlock(&icc_lock);
return 0;
} }
EXPORT_SYMBOL_GPL(icc_provider_del); EXPORT_SYMBOL_GPL(icc_provider_del);
......
...@@ -123,7 +123,7 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider); ...@@ -123,7 +123,7 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider);
void icc_node_del(struct icc_node *node); void icc_node_del(struct icc_node *node);
int icc_nodes_remove(struct icc_provider *provider); int icc_nodes_remove(struct icc_provider *provider);
int icc_provider_add(struct icc_provider *provider); int icc_provider_add(struct icc_provider *provider);
int icc_provider_del(struct icc_provider *provider); void icc_provider_del(struct icc_provider *provider);
struct icc_node_data *of_icc_get_from_provider(struct of_phandle_args *spec); struct icc_node_data *of_icc_get_from_provider(struct of_phandle_args *spec);
void icc_sync_state(struct device *dev); void icc_sync_state(struct device *dev);
...@@ -172,9 +172,8 @@ static inline int icc_provider_add(struct icc_provider *provider) ...@@ -172,9 +172,8 @@ static inline int icc_provider_add(struct icc_provider *provider)
return -ENOTSUPP; return -ENOTSUPP;
} }
static inline int icc_provider_del(struct icc_provider *provider) static inline void icc_provider_del(struct icc_provider *provider)
{ {
return -ENOTSUPP;
} }
static inline struct icc_node_data *of_icc_get_from_provider(struct of_phandle_args *spec) static inline struct icc_node_data *of_icc_get_from_provider(struct of_phandle_args *spec)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment