From patchwork Mon Jul 18 12:14:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 591806 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 115D9C43334 for ; Mon, 18 Jul 2022 12:14:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234895AbiGRMOU (ORCPT ); Mon, 18 Jul 2022 08:14:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234941AbiGRMOT (ORCPT ); Mon, 18 Jul 2022 08:14:19 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FAE819C3E for ; Mon, 18 Jul 2022 05:14:18 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDPdg-0005dQ-Sj; Mon, 18 Jul 2022 14:14:16 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1oDPdg-001i4F-66; Mon, 18 Jul 2022 14:14:16 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1oDPdf-005xVi-63; Mon, 18 Jul 2022 14:14:15 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Georgi Djakov Cc: kernel@pengutronix.de, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/8] interconnect: Make icc_provider_del() return void Date: Mon, 18 Jul 2022 14:14:08 +0200 Message-Id: <20220718121409.171773-8-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220718121409.171773-1-u.kleine-koenig@pengutronix.de> References: <20220718121409.171773-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2511; h=from:subject; bh=KwOYyFw1oDwrBpkoEkiLKczRlYc1LhavekTYkDpsLjU=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBi1U6I0hVpMyRN5RJKYZPFnvTZK8VO17RPuR2YNOXe A1RdZkyJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCYtVOiAAKCRDB/BR4rcrsCT9KB/ 9+AJarsM209wzSl2gBsVkJNEr+CQ+o0203QgzSVD5M6Qhi6hGUr1YDeSz4SH8yyrIYj8UmyxIR9c80 FowTJ8B5RzWPpysfFb67+W9i/br/vSe5oh6646OBMhiS211SxaUvvurPI86g0hN4W7RS4kxDv3nMmi ilurGHDcV6b9z0U94tyfBAlP/avoueQytWTJFYuaF0RsaMVDEWP9T1Il9qMugstuEkdYu/PdSHP0Bk 04d92AMkZ/2jn5moW/qtWcXvPYH97Oj1jVjHVcF4e6SBT6mpYIgXnmocyB+yQeJHwDktvCkA8CY0D2 A7Uzg7bdEWFxZtlzBqvrT3c+eJCoYF X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-pm@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org All users ignore the return value of icc_provider_del(). Consequently make it not return an error code. Signed-off-by: Uwe Kleine-König --- drivers/interconnect/core.c | 10 +++------- include/linux/interconnect-provider.h | 5 ++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index 808f6e7a8048..25debded65a8 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -1057,29 +1057,25 @@ EXPORT_SYMBOL_GPL(icc_provider_add); /** * icc_provider_del() - delete previously added interconnect provider * @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); if (provider->users) { pr_warn("interconnect provider still has %d users\n", provider->users); mutex_unlock(&icc_lock); - return -EBUSY; + return; } if (!list_empty(&provider->nodes)) { pr_warn("interconnect provider still has nodes\n"); mutex_unlock(&icc_lock); - return -EBUSY; + return; } list_del(&provider->provider_list); mutex_unlock(&icc_lock); - - return 0; } EXPORT_SYMBOL_GPL(icc_provider_del); diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h index 6bd01f7159c6..cd5c5a27557f 100644 --- a/include/linux/interconnect-provider.h +++ b/include/linux/interconnect-provider.h @@ -123,7 +123,7 @@ void icc_node_add(struct icc_node *node, struct icc_provider *provider); void icc_node_del(struct icc_node *node); int icc_nodes_remove(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); void icc_sync_state(struct device *dev); @@ -172,9 +172,8 @@ static inline int icc_provider_add(struct icc_provider *provider) 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)