From patchwork Thu Oct 17 23:17:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 13840914 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 69AB6D3C533 for ; Thu, 17 Oct 2024 23:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1wAwt9inLv6RNZzfXu+D3JjFm+HHPD/dN1XB8Rawcdo=; b=CuOvSjVnlxZJkHsSVVDjmYTbTu 8DT1IB+CT/EovOuQ9J7jGt3CJuokp6RKyDJbkeVGbTEu6iWJbDSgsq2YKnmeCxEoIKjt3LYpSADoH eDM3GUw20MWnud3e5ycwp9YqTAN6HMA/tBzGYoF+nJHfmWvV94zsw5kXJTnhnFwhG9DoP0Juz51SW km0mCt0WuI+OzYCTitmI6kPhuRxm4UC2EiE90Pm6n5reCBsfFVbxI/78njfnD3v+wm19BR5RgZ0L3 D0wLxiXJHVt6Cw1Y9/6Pss1xqeZscAHNXq3qPKcQaeOZfg5LxyCoRh0oBk+kRyZ3AUcwzGRY5Yb15 x5r8XaFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1Zoy-0000000GQNc-1xju; Thu, 17 Oct 2024 23:22:20 +0000 Received: from bali.collaboradmins.com ([148.251.105.195]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1Zkg-0000000GPk7-3vrn; Thu, 17 Oct 2024 23:17:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1729207073; bh=+ppoxTPO/igxME3lIs+D7CFzw+ePdaoHzXKCgEyp3Ig=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=duoZtuW9OSxIMv6WdYPn0i9n8RJBaUUUTc3uoeLJw8WXVFLD29NN6Ld/H5XdIJWxU 8h1KwcP/T4fHDfaKseadABK+hkgFg1IJGyp7Lhw/B90pOhrmD35JZyso0n4fKdwc5L Ox7FBjavFIbJ7FIxvdQ/BiFTNep6fmFCz6l7OFEaFD5dBt6PmviyR/vDNqWpAxpRdw f/wzuHgmxoVk7LnCVnNXXKDICdZWRaaN+Wsp8FOZJRjuQNsRRjlfE7PHqgYJhgVgmU 6nty7NP3AlK4tHeQbm9S8pKJamcKyMtHxbZWCV7Kf7cXrI9SXkSdqRLk2gF4bTYIqK nQTAjTZpC3Yxg== Received: from localhost (unknown [188.24.146.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id E74F717E0ED6; Fri, 18 Oct 2024 01:17:52 +0200 (CEST) From: Cristian Ciocaltea Date: Fri, 18 Oct 2024 02:17:30 +0300 Subject: [PATCH v3 2/4] soc: mediatek: pwrap: Switch to devm_clk_bulk_get_all_enabled() MIME-Version: 1.0 Message-Id: <20241018-clk_bulk_ena_fix-v3-2-57e8bb82460c@collabora.com> References: <20241018-clk_bulk_ena_fix-v3-0-57e8bb82460c@collabora.com> In-Reply-To: <20241018-clk_bulk_ena_fix-v3-0-57e8bb82460c@collabora.com> To: Michael Turquette , Stephen Boyd , Russell King , Matthias Brugger , AngeloGioacchino Del Regno , Jingoo Han , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Alim Akhtar Cc: kernel@collabora.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-samsung-soc@vger.kernel.org X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241017_161755_158915_E02B0278 X-CRM114-Status: GOOD ( 13.48 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The helper devm_clk_bulk_get_all_enable() missed to return the number of clocks stored in the clk_bulk_data table referenced by the clks argument and, therefore, will be dropped. Use the newly introduced devm_clk_bulk_get_all_enabled() variant instead, which is consistent with devm_clk_bulk_get_all() in terms of the returned value: > 0 if one or more clocks have been stored = 0 if there are no clocks < 0 if an error occurred Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Manivannan Sadhasivam Signed-off-by: Cristian Ciocaltea --- drivers/soc/mediatek/mtk-pmic-wrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c index 9fdc0ef79202618d0bd0188d0bf53152285c6c51..0bcd8582637550c90c1c6df619077b7df7bb0048 100644 --- a/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c @@ -2518,8 +2518,8 @@ static int pwrap_probe(struct platform_device *pdev) } } - ret = devm_clk_bulk_get_all_enable(wrp->dev, &clk); - if (ret) + ret = devm_clk_bulk_get_all_enabled(wrp->dev, &clk); + if (ret < 0) return dev_err_probe(wrp->dev, ret, "failed to get clocks\n");