From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [RFC PATCH 2/6] mmc: renesas_sdhi: complain loudly if driver needs update
Date: Mon, 10 Feb 2020 23:47:44 +0100 [thread overview]
Message-ID: <20200210224744.GB2443363@oden.dyn.berto.se> (raw)
In-Reply-To: <20200129203709.30493-3-wsa+renesas@sang-engineering.com>
Hi Wolfram,
Thanks for your patch.
On 2020-01-29 21:37:05 +0100, Wolfram Sang wrote:
> When the tap array in the driver is too low, this is not a warning but
> an error. Also _once is not helpful, we should make sure it is
> prominently in the logs. It is safe to do this because this will only
> show up during SoC enablement when we a new SoCs needs more taps (if
> that ever will happen).
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> Note: 'unsigned long' seems big enough for a while. But, famous last
> words(tm). We could handle this at runtime by reallocating a bigger
> buffer. Very unsure if it is worth it, though.
I can not tell if it's worth doing this now or not. But if it's a error
instead of a warning it will be easier to spot if we should have done so
;-)
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>
> drivers/mmc/host/renesas_sdhi_core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index b3ab66f963f8..d63aeb35bd0b 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -499,9 +499,9 @@ static int renesas_sdhi_execute_tuning(struct tmio_mmc_host *host, u32 opcode)
> return 0; /* Tuning is not supported */
>
> if (host->tap_num * 2 >= sizeof(host->taps) * BITS_PER_BYTE) {
> - dev_warn_once(&host->pdev->dev,
> - "Too many taps, skipping tuning. Please consider updating size of taps field of tmio_mmc_host\n");
> - return 0;
> + dev_err(&host->pdev->dev,
> + "Too many taps, please update 'taps' in tmio_mmc_host!\n");
> + return -EINVAL;
> }
>
> priv->doing_tune = true;
> --
> 2.20.1
>
--
Regards,
Niklas Söderlund
next prev parent reply other threads:[~2020-02-10 22:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 20:37 [RFC PATCH 0/6] mmc: tmio: move TAP handling to SDHI driver Wolfram Sang
2020-01-29 20:37 ` [RFC PATCH 1/6] mmc: tmio: refactor tuning execution into " Wolfram Sang
2020-02-10 22:44 ` Niklas Söderlund
2020-02-11 9:07 ` Wolfram Sang
2020-01-29 20:37 ` [RFC PATCH 2/6] mmc: renesas_sdhi: complain loudly if driver needs update Wolfram Sang
2020-02-10 22:47 ` Niklas Söderlund [this message]
2020-01-29 20:37 ` [RFC PATCH 3/6] mmc: tmio: give callback a generic name Wolfram Sang
2020-02-10 22:51 ` Niklas Söderlund
2020-01-29 20:37 ` [RFC PATCH 4/6] mmc: tmio: enforce retune after runtime suspend Wolfram Sang
2020-02-10 23:53 ` Niklas Söderlund
2020-01-29 20:37 ` [RFC PATCH 5/6] mmc: tmio: factor out TAP usage Wolfram Sang
2020-02-10 23:57 ` Niklas Söderlund
2020-01-29 20:37 ` [RFC PATCH 6/6] mmc: tmio: remove superfluous callback wrappers Wolfram Sang
2020-02-11 0:02 ` Niklas Söderlund
2020-02-11 9:09 ` Wolfram Sang
2020-02-05 0:22 ` [RFC PATCH 0/6] mmc: tmio: move TAP handling to SDHI driver Yoshihiro Shimoda
2020-02-13 13:56 ` Ulf Hansson
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=20200210224744.GB2443363@oden.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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