From mboxrd@z Thu Jan 1 00:00:00 1970 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 42AA2C369A9 for ; Wed, 25 Sep 2024 07:58:01 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VVyhhhkEl4zSrHVn0wrGDl+rurJ54yzW0NixotEwWG4=; b=qOEwHIDYT3ybXFi5STK6faBtOB 7yKtUvFnY/G60SmeeAx4vlp9pSEZnooTMp+qTHcHVcnW+CAXSCqqYdu0FKu0LK9j1+3NVUbPJ/kK8 1ABjATkmlcC05L0YhSGoaXvICV5nsNAqIolgB05zJFvcY8AgYzyH03cZiFSXZ4yZPHYtxMWV17O6D AgeFaWQxdI8zShil30sgHAR2WHaFCTcHfgeNVxsXLPrIecAMeKSimIQm8LJ+rAdCNcD3OGEx0C0xF 15fi65phX5LHqOhW/yyBS7SVP0Os5uxEIIvn8vzLbDvhemb+42GxYnWXLoSIWpfSfTzz3X6ygXMU7 21JPa+4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stMuF-00000004Pyt-44d1; Wed, 25 Sep 2024 07:57:51 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stMpL-00000004P0h-0y9j; Wed, 25 Sep 2024 07:52:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1727250765; bh=HaGjCo2JkmzWG5vS1IbRUjPXbfLtQiEoKu06nA0Sy8E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CwS0OhQxMMFoCFIS6sWAgehLjs+WK4NyXWcz5SdQxnF2oNJwCpRne9wX7fynkCv8j iPauMQi2R6OYgNdiJWrC7ivCyzeni29NvIX+2iNMItm4zxgeLqMMHFmBlzNt0KDTod 0qTbNIOnOFmBAbXWk6uFWt3MGjFIjjJDLY4mseWzeLuvZ/gv1IyMoEKN3eIde1r+8b P9v4oBY1TCCKBxIM8xMKwP4ZE3JJun1fXde27hUjvjb0XhsqPuQAbWG32d5haO4+0S nuk0wGZKjuMb0BPSwBOgCD0ShW8+PZONX5VygD0/n7R0vgLgNgXp/MS/C+o6NdKm79 6fQ5I9D047oOA== Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id 8408617E1045; Wed, 25 Sep 2024 09:52:44 +0200 (CEST) Message-ID: <70a24964-990b-4606-bdc8-4dd42c44785a@collabora.com> Date: Wed, 25 Sep 2024 09:52:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/4] Provide devm_clk_bulk_get_all_enabled() helper To: Manivannan Sadhasivam , Cristian Ciocaltea Cc: Michael Turquette , Stephen Boyd , Russell King , Matthias Brugger , Jingoo Han , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Alim Akhtar , 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 References: <20240914-clk_bulk_ena_fix-v1-0-ce3537585c06@collabora.com> <20240924143634.pqpdsewoqxn3liqi@thinkpad> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20240924143634.pqpdsewoqxn3liqi@thinkpad> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240925_005247_615633_F20470C3 X-CRM114-Status: GOOD ( 20.48 ) 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 Il 24/09/24 16:36, Manivannan Sadhasivam ha scritto: > On Sat, Sep 14, 2024 at 09:04:53PM +0300, Cristian Ciocaltea wrote: >> Commit 265b07df758a ("clk: Provide managed helper to get and enable bulk >> clocks") added devm_clk_bulk_get_all_enable() function, but missed to >> return the number of clocks stored in the clk_bulk_data table referenced >> by the clks argument. >> >> That is required in case there is a need to iterate these clocks later, >> therefore I couldn't see any use case of this parameter and should have >> been simply removed from the function declaration. >> > > Is there an user that currerntly does this? > Yes and the patch wasn't sent upstream yet, but anyway, regardless of that, this series is fixing inconsistency with both naming and usage between the clock (bulk) API functions, with that being the only function acting different from the others, at best confusing people. Cheers, Angelo > - Mani > >> The first patch in the series provides devm_clk_bulk_get_all_enabled() >> variant, 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 >> >> Moreover, the naming is consistent with devm_clk_get_enabled(), i.e. use >> the past form of 'enable'. >> >> The next two patches switch existing users of devm_clk_get_enable() to >> the new helper - there were only two, as of next-20240913. >> >> The last patch drops the now obsolete devm_clk_bulk_get_all_enable() >> helper. >> >> Signed-off-by: Cristian Ciocaltea >> --- >> Cristian Ciocaltea (4): >> clk: Provide devm_clk_bulk_get_all_enabled() helper >> soc: mediatek: pwrap: Switch to devm_clk_bulk_get_all_enabled() >> PCI: exynos: Switch to devm_clk_bulk_get_all_enabled() >> clk: Drop obsolete devm_clk_bulk_get_all_enable() helper >> >> drivers/clk/clk-devres.c | 30 ++++++++++++++++-------------- >> drivers/pci/controller/dwc/pci-exynos.c | 2 +- >> drivers/soc/mediatek/mtk-pmic-wrap.c | 4 ++-- >> include/linux/clk.h | 12 +++++++----- >> 4 files changed, 26 insertions(+), 22 deletions(-) >> --- >> base-commit: 5acd9952f95fb4b7da6d09a3be39195a80845eb6 >> change-id: 20240912-clk_bulk_ena_fix-16ba77358ddf >> >