lkml.org 
[lkml]   [2023]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: spi-nor: Lower the priority of the software reset failure message
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

\
 
 \ /
  Last update: 2023-10-19 11:14    [W:0.144 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site