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 DC889D4336D for ; Thu, 7 Nov 2024 15:23:33 +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-Type: MIME-Version:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=7+MSWZ3O7GR/ROLyIQXfwA8Pb+NeBIp0y9XyrMxs8QQ=; b=bKE46SEufO/aF0 B7QY4KwIqHHE4fIsRaRkYnL8YuU4zPz0fhT/faKUSSChYsoxEioZJBJgFUJpADiIM9LZW0BTK7fAc TzE2OmsV0AsdDDS/IE2av0zcxK4qHRvww7MtVw96Me92ynWL3F/20Q08OmAla9yz3dCjRRMU8D9Ip LPmE5+zflltxleIWqZd8qXMdkL98ExnsTO4CmqKdyFPyr4H3gxhbQd1vhZmfmJhKmN2dT7/Qf8Kue og0vS6/Gl85X4cbEGFh+OrsxlRRhLHLJ0AdnBbYnnd8WGnvI6NZU7kGfDVMb9QC9Mmk2VdXFc0Vov lJJTC7LY4HyNW2xHKTZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t94M0-00000007Qhr-21wI; Thu, 07 Nov 2024 15:23:24 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t94Ie-00000007QEM-46NH; Thu, 07 Nov 2024 15:19:58 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 92E015C4AC4; Thu, 7 Nov 2024 15:19:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0946C4CECD; Thu, 7 Nov 2024 15:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730992795; bh=A8YzchHkB7DFLxQ1pkz4RahkI6OHG7kU5FDQKVKsZYs=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=WTV9NgC98AZVB9z8/2hlOTj3wjF8lh+yzQtX3pGqSqq4CoSyLlgU5D5xe4UeW5bS4 rDlwj18jamA1MUpzkGLEW6ZxJBlo6/5UyqekHUlttGTYzJ/oOp74PSzfMqujpcC8zt /v3BheXuFcnWjmoMT9/uU5UuLFWj/pbeG0j0Cwt2peiMqe5bDWz9hUQZuBCHYuIL3B hToK8XpEHoigZRoiQc0GJ5+vYefqaBirBmMJQRq3Mm2IARKOD4+yWCeNu39EoXLrBb XCPQZLdZfA6T8tdZC4iQeMt94g4/f9ZcD07meUFv+i7EuhkAzXAqZRACmVPRjDe//X zbFbcZ5lFMdkA== Date: Thu, 7 Nov 2024 09:19:53 -0600 From: Bjorn Helgaas To: Lorenzo Bianconi Cc: Ryder Lee , Jianjun Wang , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/3] PCI: mediatek-gen3: rely on clk_bulk_prepare_enable in mtk_pcie_en7581_power_up Message-ID: <20241107151953.GA1614560@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241107-pcie-en7581-fixes-v1-2-af0c872323c7@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241107_071957_085035_C2055F3C X-CRM114-Status: GOOD ( 16.37 ) 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 Thu, Nov 07, 2024 at 02:50:54PM +0100, Lorenzo Bianconi wrote: > Squash clk_bulk_prepare and clk_bulk_enable in > clk_bulk_prepare_enable in mtk_pcie_en7581_power_up routine Thank you, this is much better. Can you add "()" after function names in subject and commit logs here and in other patches? > Signed-off-by: Lorenzo Bianconi > --- > drivers/pci/controller/pcie-mediatek-gen3.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c > index 0fac0b9fd785e463d26d29d695b923db41eef9cc..8c8c733a145634cdbfefd339f4a692f25a6e24de 100644 > --- a/drivers/pci/controller/pcie-mediatek-gen3.c > +++ b/drivers/pci/controller/pcie-mediatek-gen3.c > @@ -903,12 +903,6 @@ static int mtk_pcie_en7581_power_up(struct mtk_gen3_pcie *pcie) > pm_runtime_enable(dev); > pm_runtime_get_sync(dev); > > - err = clk_bulk_prepare(pcie->num_clks, pcie->clks); > - if (err) { > - dev_err(dev, "failed to prepare clock\n"); > - goto err_clk_prepare; > - } > - > val = FIELD_PREP(PCIE_VAL_LN0_DOWNSTREAM, 0x47) | > FIELD_PREP(PCIE_VAL_LN1_DOWNSTREAM, 0x47) | > FIELD_PREP(PCIE_VAL_LN0_UPSTREAM, 0x41) | > @@ -921,17 +915,15 @@ static int mtk_pcie_en7581_power_up(struct mtk_gen3_pcie *pcie) > FIELD_PREP(PCIE_K_FINETUNE_MAX, 0xf); > writel_relaxed(val, pcie->base + PCIE_PIPE4_PIE8_REG); > > - err = clk_bulk_enable(pcie->num_clks, pcie->clks); > + err = clk_bulk_prepare_enable(pcie->num_clks, pcie->clks); > if (err) { > dev_err(dev, "failed to prepare clock\n"); > - goto err_clk_enable; > + goto err_clk_init; > } > > return 0; > > -err_clk_enable: > - clk_bulk_unprepare(pcie->num_clks, pcie->clks); > -err_clk_prepare: > +err_clk_init: > pm_runtime_put_sync(dev); > pm_runtime_disable(dev); > reset_control_assert(pcie->mac_reset); > > -- > 2.47.0 >