From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Marcin Wojtas <mw@semihalf.com>,
Gregory CLEMENT <gregory.clement@free-electrons.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <kernel@pengutronix.de>,
linux-mmc <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 01/17] mmc: core: shut up "voltage-ranges unspecified" pr_info()
Date: Mon, 21 Dec 2015 10:24:02 +0000 [thread overview]
Message-ID: <20151221102402.GW8644@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAPDyKFqcZf+AsfDKSupVdrxcbwifQiYgyPkypaSYWu4vpqz4dg@mail.gmail.com>
On Mon, Dec 21, 2015 at 11:18:15AM +0100, Ulf Hansson wrote:
> On 19 December 2015 at 21:29, Russell King <rmk+kernel@arm.linux.org.uk> wrote:
> > Each time a driver such as sdhci-esdhc-imx is probed, we get a info
> > printk complaining that the DT voltage-ranges property has not been
> > specified.
> >
> > However, the DT binding specifically says that the voltage-ranges
> > property is optional. That means we should not be complaining that
> > DT hasn't specified this property: by indicating that it's optional,
> > it is valid not to have the property in DT.
>
> Agree!
>
> >
> > Silence the warning if the property is missing.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> > drivers/mmc/core/core.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> > index 5ae89e48fd85..b5e663b67cb5 100644
> > --- a/drivers/mmc/core/core.c
> > +++ b/drivers/mmc/core/core.c
> > @@ -1220,8 +1220,12 @@ int mmc_of_parse_voltage(struct device_node *np, u32 *mask)
> >
> > voltage_ranges = of_get_property(np, "voltage-ranges", &num_ranges);
> > num_ranges = num_ranges / sizeof(*voltage_ranges) / 2;
> > - if (!voltage_ranges || !num_ranges) {
> > - pr_info("%s: voltage-ranges unspecified\n", np->full_name);
> > + if (!voltage_ranges) {
> > + pr_debug("%s: voltage-ranges unspecified\n", np->full_name);
> > + return -EINVAL;
>
> Because it's optional, I don't think we should return an error code here.
Maybe, but that's changing the behaviour beyond what I said in the
commit message, hence should be a separate patch so that if it causes
problems, then it can be reverted independently of this fix.
> > + }
> > + if (!num_ranges) {
> > + pr_err("%s: voltage-ranges empty\n", np->full_name);
> > return -EINVAL;
>
> Ditto.
For this one, it's entirely reasonable - it's a mal-formed voltage-ranges
property.
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-12-21 10:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-19 20:28 [PATCH 00/17] MMC/SDHCI fixes Russell King - ARM Linux
2015-12-19 20:29 ` [PATCH 01/17] mmc: core: shut up "voltage-ranges unspecified" pr_info() Russell King
2015-12-21 10:18 ` Ulf Hansson
2015-12-21 10:24 ` Russell King - ARM Linux [this message]
2015-12-19 20:30 ` Russell King
2015-12-19 20:30 ` [PATCH 02/17] mmc: block: shut up "retrying because a re-tune was needed" message Russell King
2015-12-19 20:30 ` [PATCH 03/17] mmc: core: report tuning command execution failure reason Russell King
2015-12-19 20:30 ` [PATCH 04/17] mmc: sdhci: move initialisation of command error member Russell King
2015-12-19 20:30 ` [PATCH 05/17] mmc: sdhci: clean up command error handling Russell King
2015-12-19 20:30 ` [PATCH 06/17] mmc: sdhci: command response CRC " Russell King
2015-12-19 20:30 ` [PATCH 07/17] mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer Russell King
2015-12-21 10:28 ` Ulf Hansson
2015-12-21 10:53 ` Russell King - ARM Linux
2015-12-19 20:30 ` [PATCH 08/17] mmc: sdhci: clean up coding style in sdhci_adma_table_pre() Russell King
2015-12-19 20:30 ` [PATCH 09/17] mmc: sdhci: avoid walking SG list for writes Russell King
2015-12-19 20:30 ` [PATCH 10/17] mmc: sdhci: factor out common DMA cleanup in sdhci_finish_data() Russell King
2015-12-19 20:30 ` [PATCH 11/17] mmc: sdhci: move sdhci_pre_dma_transfer() Russell King
2015-12-19 20:31 ` [PATCH 12/17] mmc: sdhci: factor out sdhci_pre_dma_transfer() from sdhci_adma_table_pre() Russell King
2015-12-19 20:31 ` [PATCH 13/17] mmc: sdhci: pass the cookie into sdhci_pre_dma_transfer() Russell King
2015-12-19 20:31 ` [PATCH 14/17] mmc: sdhci: always unmap a mapped data transfer in sdhci_post_req() Russell King
2015-12-19 20:31 ` [PATCH 15/17] mmc: sdhci: clean up host cookie handling Russell King
2015-12-19 20:31 ` [PATCH 16/17] mmc: sdhci: plug DMA mapping leak on error Russell King
2015-12-19 20:31 ` [PATCH 17/17] mmc: sdhci-pxav3: fix higher speed mode capabilities Russell King
2015-12-19 21:42 ` [PATCH 18/17] mmc: sdhci: further fix for DMA unmapping in sdhci_post_req() Russell King
2015-12-20 8:27 ` [PATCH 19/17] mmc: sdhci: fix data timeout (part 1) Russell King
2015-12-20 8:27 ` [PATCH 20/17] mmc: sdhci: fix data timeout (part 2) Russell King
2015-12-21 10:46 ` [PATCH 00/17] MMC/SDHCI fixes Ulf Hansson
2015-12-21 11:04 ` Russell King - ARM Linux
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=20151221102402.GW8644@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=gregory.clement@free-electrons.com \
--cc=kernel@pengutronix.de \
--cc=linux-mmc@vger.kernel.org \
--cc=mw@semihalf.com \
--cc=shawnguo@kernel.org \
--cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).