From patchwork Tue Dec 12 17:26:38 2023 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: 13489713 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50941C4332F for ; Tue, 12 Dec 2023 17:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dftVCmVrqHZNJKmcAWvRmbmr23+WtOdySZWoFoavjjY=; b=bnnWd/CCFVtTUN ZExEstA5OicSMhgmEIyQr/e3U8439VMoC2/L54eym2W9CGxZoMdLGz7sv44TdPxrg5i2lkTD5IzLW jr6um8NqI5Lh+a3tYvKU2EgPL4qnjJBf5ErKKviMvUTpsv6Il5qoXoWkHH0Toa97sFJFdqMlmHDTy b1VBe8BEMbMXo9RBtEVjeXLKMrWTUM5KPcjTidP3zLcZQtp2rL6hUuOJ9tCHK0hpQ/1s2dcSOXPTY hiqzCKhSlfanGJwnTBEY+VfNp0FYwBD44USPQ5H/aydx5ajc84ABUC0z99KtEGzTe/rYEweFkVheU MPelq1vUy97N9WSIS8Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rD6XI-00CNoM-1S; Tue, 12 Dec 2023 17:27:12 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rD6XE-00CNmb-0q for linux-arm-kernel@lists.infradead.org; Tue, 12 Dec 2023 17:27:10 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rD6X0-0001uN-S6; Tue, 12 Dec 2023 18:26:54 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rD6Ww-00FOPG-CS; Tue, 12 Dec 2023 18:26:50 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rD6Ww-001nbZ-3C; Tue, 12 Dec 2023 18:26:50 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Turquette , Stephen Boyd , Russell King Cc: linux-clk@vger.kernel.org, MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@pengutronix.de Subject: [PATCH 1/5] PM / devfreq: sun8i-a33-mbus: Simplify usage of clk_rate_exclusive_get() Date: Tue, 12 Dec 2023 18:26:38 +0100 Message-ID: <5ef585a3d7bee42bac5be0e40efcfbc6e75adfff.1702400947.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1602; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=BWEEMlbdk3cKjZWyjUvI7IytAUTTT/WV9gCP1GmZcvI=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBleJfOPmhzoDA5sG4qdhrM/sUvX0qCREHgSRiU7 27S9foq6kCJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZXiXzgAKCRCPgPtYfRL+ Thb/B/4w7Bw3FZfecp+Y/PyOwb2XfViWXvM2i2f8tgwva1QajIak9kWuF0ZP1djzjPmArx0WOgi YUd/05PoXflA6sbaolfQrr4uKIRiukF7cs3ohwBjLwCfdVM8FroeP9KIXAcvi3qyX783jicwxzz fLisYqpkTtYsnKPzHhLumHKKIMV4fmWgYpWm9cE8bIVn//IUWOwN5Of3ighdH0PZqg4CKWEuNSW APNEhWEhPIc1XPW5xsBB1SSTPRTRAlVvyFjO1JEO8LIYr1azhNzgV1YWEeWY9A0JKQXaYwNW8Sl 9L6/ctC/RrM5mOka4woknUF4DKZbyZ3GNUf/9rwQwdyWwYUv 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231212_092708_303824_C2781AFB X-CRM114-Status: GOOD ( 12.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org clk_rate_exclusive_get() returns 0 unconditionally. So remove error handling. This prepares making clk_rate_exclusive_get() return void. Signed-off-by: Uwe Kleine-König Reviewed-by: Andre Przywara --- drivers/devfreq/sun8i-a33-mbus.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/devfreq/sun8i-a33-mbus.c b/drivers/devfreq/sun8i-a33-mbus.c index 13d32213139f..bbc577556944 100644 --- a/drivers/devfreq/sun8i-a33-mbus.c +++ b/drivers/devfreq/sun8i-a33-mbus.c @@ -381,18 +381,10 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev) "failed to enable bus clock\n"); /* Lock the DRAM clock rate to keep priv->nominal_bw in sync. */ - ret = clk_rate_exclusive_get(priv->clk_dram); - if (ret) { - err = "failed to lock dram clock rate\n"; - goto err_disable_bus; - } + clk_rate_exclusive_get(priv->clk_dram); /* Lock the MBUS clock rate to keep MBUS_TMR_PERIOD in sync. */ - ret = clk_rate_exclusive_get(priv->clk_mbus); - if (ret) { - err = "failed to lock mbus clock rate\n"; - goto err_unlock_dram; - } + clk_rate_exclusive_get(priv->clk_mbus); priv->gov_data.upthreshold = 10; priv->gov_data.downdifferential = 5; @@ -450,9 +442,7 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev) dev_pm_opp_remove_all_dynamic(dev); err_unlock_mbus: clk_rate_exclusive_put(priv->clk_mbus); -err_unlock_dram: clk_rate_exclusive_put(priv->clk_dram); -err_disable_bus: clk_disable_unprepare(priv->clk_bus); return dev_err_probe(dev, ret, err);