From patchwork Tue Dec 12 17:26:42 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: 13489728 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 3A856C35274 for ; Tue, 12 Dec 2023 17:27:43 +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=bDb7gu3O8kKed1hwFWRudk/WqdvEg3izHYxb07yGOVI=; b=awj7/I6fBtkZF5 J5H+A9r2DJji6bW/PO00XxUk7gFIjrsd1SPSRKXJtUPXMCVE+8I4Xd2dtlEY2ev96pzYzcGiga8ky 7YAznqebW8WM/xfF4CK8VxqS5PP5CdIMzMvwuSM9svrGLKJt0ofTby4KVvvhHOY5H9hrvXcSNf+4Y 37r0c5FHysnIzpO2n/87RxaIJ9kKXAVvQLGfDqNp7WbeEXfxfGgJF+E8Vvxl4TEHzc+r41vY1Vgek GhmrQCKp/TlElghlhDEbFaBjmThrdSoPYXH7QLZu3OaYgBxaL/3kLZvx6Xb+CaAPAq0F2wZny4R0E YGPO+Gld8o149oopEvWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rD6XR-00CNt9-32; Tue, 12 Dec 2023 17:27:21 +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 1rD6XL-00CNpm-09 for linux-amlogic@lists.infradead.org; Tue, 12 Dec 2023 17:27:17 +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 1rD6X1-0001uR-3P; Tue, 12 Dec 2023 18:26:55 +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 1rD6Wx-00FOPS-AU; Tue, 12 Dec 2023 18:26:51 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rD6Wx-001nbp-0U; Tue, 12 Dec 2023 18:26:51 +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, 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, Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Rob Herring , linux-tegra@vger.kernel.org, Johan Hovold , Georgi Djakov , kernel@pengutronix.de Subject: [PATCH 5/5] clk: Make clk_rate_exclusive_get() return void Date: Tue, 12 Dec 2023 18:26:42 +0100 Message-ID: <3f556647c09162be61edba6b50e76d235aace590.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=2265; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=qJe1s9wVwLl8m/pFpVrdi1+PKSyFn6KyEhyiKlqeWWk=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtSK6Zf0mliZ79remRRaoTdVj3sjX5Z43dTfXEr7MubN7 cv5Yz2jk9GYhYGRi0FWTJHFvnFNplWVXGTn2n+XYQaxMoFMYeDiFICJuD3nYNgg+PrYSkuD2Eki L1U4HRwVOm/VLGkPWWUoV1WYwxBfEWYmlb5vdk5eXETUxLjPjnuM9m124lwrkvHnX3X3TrfzUWd XtRVfrdwx53zY0iitL8q7iiOm/RSY41yVxy7Q3SF+Yf3DO/PK2hbZC6n2+hisPicuvTMhrsv85J +QOu6/GZ3CmxdfOB8buHp9dNSn+ZszIi1YT3amxbtM0I1SV/vT2/G2XCwjeaJz5bNzS+UOnBYu3 8VyICqoSHNi9dnMPxmiJx7qHy3ZySo1tTiDY5NraL5Po03Y7PjDOWnuQoe36p20d9SY6BYbPV8/ xLjJxNLi0Z73rq0//xkv+LSD59R1XatNPzx3tk47vXM3AA== 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_092715_081715_58B4EA3D X-CRM114-Status: GOOD ( 13.17 ) 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 The function currently returns 0 unconditionally. This isn't very useful and makes users create dead code error paths. So let this function return no value. All users were adapted before to ignore the returned value. Also fix a few typos in the kernel doc comment for clk_rate_exclusive_get(). Signed-off-by: Uwe Kleine-König --- drivers/clk/clk.c | 6 ++---- include/linux/clk.h | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 2253c154a824..af2011c2a93b 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -925,17 +925,15 @@ static void clk_core_rate_restore_protect(struct clk_core *core, int count) * clk_rate_exclusive_put(). Calls to this function may sleep. * Returns 0 on success, -EERROR otherwise */ -int clk_rate_exclusive_get(struct clk *clk) +void clk_rate_exclusive_get(struct clk *clk) { if (!clk) - return 0; + return; clk_prepare_lock(); clk_core_rate_protect(clk->core); clk->exclusive_count++; clk_prepare_unlock(); - - return 0; } EXPORT_SYMBOL_GPL(clk_rate_exclusive_get); diff --git a/include/linux/clk.h b/include/linux/clk.h index 06f1b292f8a0..f88c407925f8 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -190,16 +190,14 @@ bool clk_is_match(const struct clk *p, const struct clk *q); * * This function allows drivers to get exclusive control over the rate of a * provider. It prevents any other consumer to execute, even indirectly, - * opereation which could alter the rate of the provider or cause glitches + * operation which could alter the rate of the provider or cause glitches * - * If exlusivity is claimed more than once on clock, even by the same driver, + * If exclusivity is claimed more than once on clock, even by the same driver, * the rate effectively gets locked as exclusivity can't be preempted. * * Must not be called from within atomic context. - * - * Returns success (0) or negative errno. */ -int clk_rate_exclusive_get(struct clk *clk); +void clk_rate_exclusive_get(struct clk *clk); /** * clk_rate_exclusive_put - release exclusivity over the rate control of a