public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: AceLan Kao <acelan.kao@canonical.com>
Cc: Tudor Ambarus <tudor.ambarus@linaro.org>,
	Pratyush Yadav <pratyush@kernel.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: spi-nor: Lower the priority of the software reset failure message
Date: Thu, 19 Oct 2023 09:44:44 +0200	[thread overview]
Message-ID: <cf4143937dea52a4a4f40ed602ec74b1@walle.cc> (raw)
In-Reply-To: <20231019064547.348446-1-acelan.kao@canonical.com>

Hi,

> Not all SPI drivers support soft reset enable and soft reset commands.
> This failure is expected and not critical.

This is not really expected. What driver is this? Let me guess, the 
intel
SPI driver.

Please mention this in the commit message.

> Thus, we avoid reporting it
> to regular users to prevent potential confusion regarding power-off 
> issues.
> 
> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
> ---
>  drivers/mtd/spi-nor/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 1b0c6770c14e..7bca8ffcd756 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -3252,7 +3252,7 @@ static void spi_nor_soft_reset(struct spi_nor 
> *nor)
> 
>  	ret = spi_mem_exec_op(nor->spimem, &op);
>  	if (ret) {
> -		dev_warn(nor->dev, "Software reset failed: %d\n", ret);
> +		dev_info(nor->dev, "Software reset failed: %d\n", ret);

What is the value of ret here? Ideally it should be -EOPNOTSUPP and then
don't print this message at all. Otherwise leave it at dev_warn(). Also,
please add a comment here.

-michael

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2023-10-19  7:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19  6:45 [PATCH] mtd: spi-nor: Lower the priority of the software reset failure message AceLan Kao
2023-10-19  7:44 ` Michael Walle [this message]
2023-10-19 12:52 ` Pratyush Yadav
2023-10-23  2:34   ` AceLan Kao

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=cf4143937dea52a4a4f40ed602ec74b1@walle.cc \
    --to=michael@walle.cc \
    --cc=acelan.kao@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=pratyush@kernel.org \
    --cc=richard@nod.at \
    --cc=tudor.ambarus@linaro.org \
    --cc=vigneshr@ti.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