From patchwork Tue Dec 17 21:41:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 13912562 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31C611FA8C0; Tue, 17 Dec 2024 21:42:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734471761; cv=none; b=hXPEz0x5GD7JZoKpzjhHpcMkauPI/NqcmSNIiQAwIpkJ6N+wBJl5Z+KTq70lk1P1m+y4/Cv5WK/KRt9TFTKOPf2weRQ/YfE/bifXhRM2VcJel03+Y83VxLtRoAUkHqJo4NdhpZY6D9AVe7kBiLA70TcoDJ74kIvkqfutZeuZKfU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734471761; c=relaxed/simple; bh=+ppoxTPO/igxME3lIs+D7CFzw+ePdaoHzXKCgEyp3Ig=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HOHYlwcJkfoa4V2Lnq7Df+Sp+mYft2M0riASI3rI6ahuGbp+t6OJKg+aw2F9JHFPaECbN0HBa3soE9hxRsrYai8m+Fh0UprA5f2HrQr5SPo0MPql2PvTW2mpz1ua+QySzS598MBRalY/lOPNRsxhjL4AnU71MMlxOnnibuwS+LY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=awNT39te; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="awNT39te" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1734471757; bh=+ppoxTPO/igxME3lIs+D7CFzw+ePdaoHzXKCgEyp3Ig=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=awNT39teoZUlKdCTS+iX7cR8Jk9hisY0G7DDaOQGw+4aeF8A2jgFRkNw76A+2kF95 dQltQIz9+U6UaeBPi5qUrll2Lv8Juzy1wow6/YFo9ETmvfO2QXxFOCVJncEI1KOZya TeoqymqT0jEiezxCnsIAwJr/f3EU1/xLv508z8eWzE82vAePXX9ljCpF0a8dSHaVXy lpwobz0jAz6HgXxR1Uh/p2GTe4uhWX+lNhrKGpz13YO1kXfpxL317Iu0AlrH9xZjIY XX+wiOi0FdDzk0ghOXXhOcD/e3EusO8hiyIhkiWCJuFuzHYet6Z06xOrfi30CCZTOs i3cwXc10X0kJg== Received: from localhost (unknown [84.232.140.38]) (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 1C14017E3818; Tue, 17 Dec 2024 22:42:37 +0100 (CET) From: Cristian Ciocaltea Date: Tue, 17 Dec 2024 23:41:51 +0200 Subject: [PATCH v5 1/3] soc: mediatek: pwrap: Switch to devm_clk_bulk_get_all_enabled() Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241217-clk_bulk_ena_fix-v5-1-aafbbb245155@collabora.com> References: <20241217-clk_bulk_ena_fix-v5-0-aafbbb245155@collabora.com> In-Reply-To: <20241217-clk_bulk_ena_fix-v5-0-aafbbb245155@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 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 Acked-by: AngeloGioacchino Del Regno --- 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");