From: "Krzysztof Wilczyński" <kw@linux.com>
To: Michal Simek <michal.simek@xilinx.com>
Cc: linux-kernel@vger.kernel.org, monstr@monstr.eu, git@xilinx.com,
Hyun Kwon <hyun.kwon@xilinx.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Rob Herring <robh@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: xilinx-nwl: Enable the clock through CCF
Date: Wed, 23 Jun 2021 14:20:40 +0200 [thread overview]
Message-ID: <20210623122040.GA46059@rocinante> (raw)
In-Reply-To: <dbc0ab2e109111ca814e73abb30a1dda5d333dbe.1624449519.git.michal.simek@xilinx.com>
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
next prev parent reply other threads:[~2021-06-23 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 11:58 [PATCH] PCI: xilinx-nwl: Enable the clock through CCF Michal Simek
2021-06-23 12:20 ` Krzysztof Wilczyński [this message]
2021-06-23 13:08 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210623122040.GA46059@rocinante \
--to=kw@linux.com \
--cc=bhelgaas@google.com \
--cc=git@xilinx.com \
--cc=hyun.kwon@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox