From patchwork Tue Dec 12 17:26:39 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: 13489726 X-Patchwork-Delegate: neil.armstrong@linaro.org 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 C8F5AC4167B for ; Tue, 12 Dec 2023 17:27:41 +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=s1TIHeS66NFoukS5cL/Tkj+9nl/FMaAndKuE1HdBg1Q=; b=AnDPmLdQU1gNoN wmoKhtJ2HpiC7iAdf27MsV/Wo/iMGmOwV2D5rF8hvOG83xelLR4CCDrW6gChEd33hEUWfn5Oc7LOU MuTZ+RwKqeQaAx5UHy50EeMeCcCqs/TZk7MGL90LSKZhySWGkaNB0F9dhCWtfEqnykb2oZeaA332N 2eX5uKxseryz4JgUtzO9sUxnFc+94Xz1HjxI7jSqO6JtklIAKxB4ollAtmo0CAlR4KSGYZs95J8Qj 5K8lIVKe9hGO7OEv55ELWnbg7kcNFxTCCeHLuVLIZCZ6vyKUaT/4ZUgwXZhpmr1FWWSXyn1LFRD79 h1rCyo8p4QbL18bmQh0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rD6XJ-00CNod-0Z; Tue, 12 Dec 2023 17:27:13 +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-00CNmY-0q for linux-amlogic@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 1rD6Wx-0001uO-KM; Tue, 12 Dec 2023 18:26:51 +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-00FOPJ-Ja; 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-001nbc-AC; 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, Neil Armstrong , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , dri-devel@lists.freedesktop.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Subject: [PATCH 2/5] drm/meson: Simplify usage of clk_rate_exclusive_get() Date: Tue, 12 Dec 2023 18:26:39 +0100 Message-ID: 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=1307; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=lLn3GpEtn8Cldb1t/gKKd7hxYx+CsmdNoorQTl0ii64=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBleJfPh1ko5EuKFkzhis18D1Q6ufxw2cmlRezUb e1bX4MJFxWJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZXiXzwAKCRCPgPtYfRL+ TuuXCACFYHK5vepI6H1w3vCAtGF3mzbvZvEHD9O6QgdN21YNyyRm5kW1ZmKRVDiiOabTVbvn6i/ r39UlcJB9fpR9+HopiUwEA+e8cmJF/6TfvG29AVvfxpEVBVhrXHQJo6JB6n9Z7ccemj7jxMIMit x/3W3JwISr2aymfEcfTrFnnxdK9bAnqa0w2zs+NcKeIGn4CX8sQzvf2FjdUTFHHvBXjBOns7g+C UHEn7VB/4ZkwXr9AbvUSPgxMkgDDm+JDoabKjzRVViZ0D2F0FmFBjDRHKlUgtSXA1J8bZ0fVtGM 5pVKd7TqH5FT6GXCnpqsgghJkyVfCpitvxCNhlgib/X06l7P 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-amlogic@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231212_092708_309274_8606189E X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=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 --- Hello, btw, the driver fails to call clk_rate_exclusive_put() in the error paths of dw_mipi_dsi_phy_init(). Best regards Uwe drivers/gpu/drm/meson/meson_dw_mipi_dsi.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c b/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c index a6bc1bdb3d0d..49571f1ed88a 100644 --- a/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c +++ b/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c @@ -88,15 +88,9 @@ static int dw_mipi_dsi_phy_init(void *priv_data) } /* Make sure the rate of the bit clock is not modified by someone else */ - ret = clk_rate_exclusive_get(mipi_dsi->bit_clk); - if (ret) { - dev_err(mipi_dsi->dev, - "Failed to set the exclusivity on the bit clock rate (ret %d)\n", ret); - return ret; - } + clk_rate_exclusive_get(mipi_dsi->bit_clk); ret = clk_set_rate(mipi_dsi->px_clk, mipi_dsi->mode->clock * 1000); - if (ret) { dev_err(mipi_dsi->dev, "Failed to set DSI Pixel clock rate %u (%d)\n", mipi_dsi->mode->clock * 1000, ret);