[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210623122040.GA46059@rocinante>
Date: Wed, 23 Jun 2021 14:20:40 +0200
From: Krzysztof WilczyĆski <kw@...ux.com>
To: Michal Simek <michal.simek@...inx.com>
Cc: linux-kernel@...r.kernel.org, monstr@...str.eu, git@...inx.com,
Hyun Kwon <hyun.kwon@...inx.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH] PCI: xilinx-nwl: Enable the clock through CCF
Hi Michal,
Thank you for sending the patch over!
> Simply enable clocks. There is no remove function that's why
> this should be enough for simple operation.
What clock is this? Would it be worth mentioning what it is for
a reference (and for posterity) the commit message?
Also why it would need to be enabled and wasn't before? Would this be
a fix for some problem? Would this warrant a "Fixes:" tag? And would
it need to be back-ported to stable kernels?
[...]
> @@ -823,6 +825,11 @@ static int nwl_pcie_probe(struct platform_device *pdev)
> return err;
> }
>
> + pcie->clk = devm_clk_get(dev, NULL);
> + if (IS_ERR(pcie->clk))
> + return PTR_ERR(pcie->clk);
> + clk_prepare_enable(pcie->clk);
> +
[...]
Almost every other user of clk_prepare_enable() would check for
potential failure, print an appropriate message, and then do the
necessary clean-up before bailing out and returning an error.
Would adding an error check for clk_prepare_enable() and printing an
error message using dev_err() be too much in this case? If not, then
I would rather follow the pattern that other users established and
handle errors as needed. What do you think?
Krzysztof
Powered by blists - more mailing lists