From: Thierry Reding <thierry.reding@avionic-design.de>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Jay Agarwal <jagarwal@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
Krishna Thota <kthota@nvidia.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"olof@lixom.net" <olof@lixom.net>,
Laxman Dewangan <ldewangan@nvidia.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"mturquette@linaro.org" <mturquette@linaro.org>,
Juha Tukkinen <jtukkinen@nvidia.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Hiroshi Doyu <hdoyu@nvidia.com>
Subject: Re: [PATCH 1/3] ARM: tegra: pcie: Add tegra3 support
Date: Sat, 13 Apr 2013 12:23:19 +0200 [thread overview]
Message-ID: <20130413102319.GA30758@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <51682975.1080302@wwwdotorg.org>
[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]
On Fri, Apr 12, 2013 at 09:34:13AM -0600, Stephen Warren wrote:
> On 04/12/2013 08:58 AM, Jay Agarwal wrote:
> >>> err = regulator_disable(pcie->pex_clk_supply);
> >>> if (err < 0)
> >>> - dev_err(pcie->dev, "failed to disable pex-clk regulator:
> >> %d\n",
> >>> + dev_warn(pcie->dev, "failed to disable pex-clk regulator:
> >> %d\n",
> >>> err);
> >>>
> >>> err = regulator_disable(pcie->vdd_supply);
> >>> if (err < 0)
> >>> - dev_err(pcie->dev, "failed to disable VDD regulator: %d\n",
> >>> + dev_warn(pcie->dev, "failed to disable VDD regulator:
> >> %d\n",
> >>> err);
> >>
> >> Please explain why that change is correct. If the regulators only exist on
> >> Tegra20, please represent that fact in the SoC data. Regulators must always
> >> exist, so enable/disable should never fail due to missing regulators. Actual
> >> run-time failures seem like something that really is an error.
> >>
> > [>] These regulators are needed for both tegra20 & tegra30. Since we are not returning error here, so changed to dev_warn.
>
> If the regulators are required, then any failure to operate them should
> be an error, hence dev_err() seems correct.
>
> As to why the code doesn't actually return an error? I'm not sure.
> Perhaps that should be fixed with a separate patch, although I don't
> recall exactly where in the code the above excerpt is; if it's in
> remove(), then continuing on without returning an error would be
> appropriate.
That code is from tegra_pcie_power_off(), which is called only during
error cleanup or from tegra_pcie_put_resources() which in turn is also
only called in cleanup paths or during module/device removal. Disabling
as many regulators as possible is still what we want in that case, so
returning an error prematurely might leave more regulators turned on
than necessary.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-04-13 10:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-08 15:41 Jay Agarwal
2013-04-08 15:41 ` [PATCH 2/3] ARM: dts: tegra: Correct PCIe entry Jay Agarwal
2013-04-08 18:27 ` Stephen Warren
2013-04-09 8:30 ` Peter De Schrijver
2013-04-09 15:46 ` Stephen Warren
2013-04-12 15:03 ` Jay Agarwal
2013-04-08 15:41 ` [PATCH 3/3] ARM: dts: tegra: Add PCIe entry for cardhu Jay Agarwal
2013-04-08 18:32 ` Stephen Warren
2013-04-08 18:11 ` [PATCH 1/3] ARM: tegra: pcie: Add tegra3 support Stephen Warren
2013-04-12 14:58 ` Jay Agarwal
2013-04-12 15:34 ` Stephen Warren
2013-04-13 10:23 ` Thierry Reding [this message]
2013-04-08 18:21 ` Stephen Warren
2013-04-12 16:43 ` Jay Agarwal
2013-04-12 17:01 ` Stephen Warren
2013-04-12 17:06 ` Jay Agarwal
2013-04-12 18:29 ` Stephen Warren
2013-04-10 17:23 ` Stephen Warren
2013-05-06 19:49 ` Stephen Warren
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=20130413102319.GA30758@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=bhelgaas@google.com \
--cc=hdoyu@nvidia.com \
--cc=jagarwal@nvidia.com \
--cc=jtukkinen@nvidia.com \
--cc=kthota@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mturquette@linaro.org \
--cc=olof@lixom.net \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=swarren@wwwdotorg.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
Powered by JetHome