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 4407DC369A8 for ; Wed, 25 Sep 2024 08:02:46 +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:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ex1eFr4hS+ZGn1Z31JmBv4PhcgqRDO/Hbk8Px9C2Jek=; b=4/z0gwygIjyUWV19jM0rk/Uu9G 3mkLXYOm4uoDV/osoDLC767RP3EQAjXshkQSikx53udQa2FQZ9AhT7ZMYwHNGRuOkBDlzrLUR7q7R Mbw4F7XUUxKj/sUfEqvuB0gr7c48l+RQUSWcrVPUAelrSRDUUutM8csDMDlWY2SmgQyh/IsoWJ8QY wj3TdGhgMmFqn8lla7Tqpii8uGKH48hDhsstfbUC1r2gy0SqNErLYdKnGHHDQ6CCzGHfJswTIZ9Bp qYbRsCiwx0hF9bnkqBIIz6Ir3gKWIRUEQwxRZWu7dxpDEj4fSVY2M/vzSUK+2P3LBQCz95DK23+0K 2hMIS+lQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1stMyn-00000004R3m-27UM; Wed, 25 Sep 2024 08:02:33 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1stMtO-00000004Pn8-0Dmf for linux-arm-kernel@lists.infradead.org; Wed, 25 Sep 2024 07:56:59 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-378f600e090so3663235f8f.3 for ; Wed, 25 Sep 2024 00:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727251016; x=1727855816; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ex1eFr4hS+ZGn1Z31JmBv4PhcgqRDO/Hbk8Px9C2Jek=; b=voPwJy3zCT3a+QIJSJxTlHl1vp44btcIL4lVqNFpVRDHSa9c3QB9wcGT/qnGDFtUDr eSG28NHmjswsAz61RYdj/fhxwVrJ6JfM5igkPU82Sg2qsO2l4sYPh05u0gjcm9Zo5sou 4M9jaK3jpaPuRnL6YG3zGPYuMP+0RztqDWW8ntqreO+jG4o6ZEcBCNBg9iVcoKwIDcl/ O5DhkC4K+D9nBJPk0a112Na1GbTWNKJJsKSPOVjdunAmWcK7hoBzsAvFndlZXOqEVylI 2h71rGDBvpBOWl3LwI+aAvU5eq7yBXdSS8a48qZNIDHGpEpgTtkfleNGwdmYX83jlM1B ZhyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727251016; x=1727855816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ex1eFr4hS+ZGn1Z31JmBv4PhcgqRDO/Hbk8Px9C2Jek=; b=r9GuzgS7vzEpE2KFOH/1/BXQMj5GN24/2GS7WeddCpnUWKkP/WeRUlhNxmXgWlpoE9 D6gLvpSYpeCCHPjXlxt5uz8yaDMT4H/cZTHf8vhKU9ZXZN/wekliTimomYo9GZXLnMFA +X/15IvGcwzYKJK2YZqyjIl6yVPakQ/ALbKf38mOaGLtnQ5WpaM2Y3klkVTBwiTlFkYD eUtSruoTUJXjG7E6SVE2lsOXy/3bGBJE09SPF+MJciVv35GS6vFqyCY4wqXw+JI1Fw2/ o0T3/fHXKNEEPfm7fK8ia3L02CchDlH7w+92dNDGCWNWUUf6dLP5XQ80HgUm1YXM6tYV EhgQ== X-Forwarded-Encrypted: i=1; AJvYcCVNXfVmLMHNNkZpYEQS0MrF/Mh6hevJ2pWziaJ45vC4uRjd3+atcAwWa4km47K5OZjOwNd2ewiaxLkEr2GwgBqR@lists.infradead.org X-Gm-Message-State: AOJu0YyzuH7MD3kC25RudCrLmnFvR36uE4X4smYbI3jvdIWf7SdTGs7/ S4bS3koiydzEzQd3hjFNe75MklvO6h7X3esM5fOxoOpHj6cHV8hjYZ8bqQgo/Q== X-Google-Smtp-Source: AGHT+IF2WTBpi0WKM13oYD6g9v8s+vSbS1vZ7h85OwPzdWyievegW/qIqe69gYQpJLdHkgY2OvXiUQ== X-Received: by 2002:a5d:64c9:0:b0:368:7f4f:9ead with SMTP id ffacd0b85a97d-37cc246b30emr1075354f8f.7.1727251016023; Wed, 25 Sep 2024 00:56:56 -0700 (PDT) Received: from thinkpad ([80.66.138.17]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a1682csm10166775e9.36.2024.09.25.00.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 00:56:55 -0700 (PDT) Date: Wed, 25 Sep 2024 09:56:54 +0200 From: Manivannan Sadhasivam To: AngeloGioacchino Del Regno Cc: Cristian Ciocaltea , Michael Turquette , Stephen Boyd , Russell King , Matthias Brugger , Jingoo Han , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?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 Subject: Re: [PATCH 0/4] Provide devm_clk_bulk_get_all_enabled() helper Message-ID: <20240925075654.f2pefosdspqiakvj@thinkpad> References: <20240914-clk_bulk_ena_fix-v1-0-ce3537585c06@collabora.com> <20240924143634.pqpdsewoqxn3liqi@thinkpad> <70a24964-990b-4606-bdc8-4dd42c44785a@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <70a24964-990b-4606-bdc8-4dd42c44785a@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240925_005658_157388_80B51EE4 X-CRM114-Status: GOOD ( 30.27 ) 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 On Wed, Sep 25, 2024 at 09:52:44AM +0200, AngeloGioacchino Del Regno wrote: > 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. > I agree with the 'inconsistency' part of the API, but I wouldn't call it as *broken* as this series does. Please fix that and you can have my: Reviewed-by: Manivannan Sadhasivam - Mani > 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 > > > > > > > -- மணிவண்ணன் சதாசிவம்