2023-11-29 06:43:26

by AceLan Kao

[permalink] [raw]
Subject: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported

From: "Chia-Lin Kao (AceLan)" <[email protected]>

When the software reset command isn't supported, we now stop reporting
the warning message to avoid unnecessary warnings and potential confusion.

Reviewed-by: Dhruva Gole <[email protected]>
Reviewed-by: Michael Walle <[email protected]>
Reviewed-by: Mika Westerberg <[email protected]>
Acked-by: Pratyush Yadav <[email protected]>
Signed-off-by: Chia-Lin Kao (AceLan) <[email protected]>

---
v2. only lower the priority for the not supported failure
v3. replace ENOTSUPP with EOPNOTSUPP and check the first command only
v4. move the version information below the '---' line
v5. remove dev_warn if soft reset operation is not supported
---
drivers/mtd/spi-nor/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 87cb2047df80..96a207751cf2 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3237,7 +3237,8 @@ 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);
+ if (ret != -EOPNOTSUPP)
+ dev_warn(nor->dev, "Software reset failed: %d\n", ret);
return;
}

--
2.34.1


2023-11-29 07:46:20

by Tudor Ambarus

[permalink] [raw]
Subject: Re: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported



On 11/29/23 06:43, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <[email protected]>
>

Hi,

> When the software reset command isn't supported, we now stop reporting
> the warning message to avoid unnecessary warnings and potential confusion.
>
> Reviewed-by: Dhruva Gole <[email protected]>
> Reviewed-by: Michael Walle <[email protected]>
> Reviewed-by: Mika Westerberg <[email protected]>
> Acked-by: Pratyush Yadav <[email protected]>
> Signed-off-by: Chia-Lin Kao (AceLan) <[email protected]>

You haven't specified who shall take these patches. Is it fine for you
if I take just the SPI NOR bits? If you want Mark to queue both:

Acked-by: Tudor Ambarus <[email protected]>
>
> ---
> v2. only lower the priority for the not supported failure
> v3. replace ENOTSUPP with EOPNOTSUPP and check the first command only
> v4. move the version information below the '---' line
> v5. remove dev_warn if soft reset operation is not supported
> ---
> drivers/mtd/spi-nor/core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 87cb2047df80..96a207751cf2 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -3237,7 +3237,8 @@ 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);
> + if (ret != -EOPNOTSUPP)
> + dev_warn(nor->dev, "Software reset failed: %d\n", ret);
> return;
> }
>

2023-11-29 08:41:14

by Miquel Raynal

[permalink] [raw]
Subject: Re: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported

Hi AceLan,

[email protected] wrote on Wed, 29 Nov 2023 14:43:11 +0800:

> From: "Chia-Lin Kao (AceLan)" <[email protected]>
>
> When the software reset command isn't supported, we now stop reporting
> the warning message to avoid unnecessary warnings and potential confusion.
>
> Reviewed-by: Dhruva Gole <[email protected]>
> Reviewed-by: Michael Walle <[email protected]>
> Reviewed-by: Mika Westerberg <[email protected]>
> Acked-by: Pratyush Yadav <[email protected]>
> Signed-off-by: Chia-Lin Kao (AceLan) <[email protected]>

Reviewed-by: Miquel Raynal <[email protected]>

Thanks,
Miquèl

2023-11-29 21:19:25

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported

On Wed, Nov 29, 2023 at 07:46:02AM +0000, Tudor Ambarus wrote:

> You haven't specified who shall take these patches. Is it fine for you
> if I take just the SPI NOR bits? If you want Mark to queue both:

I can certainly take both. I guess there's no build time dependency so
we could each take the subsystem specific patch, though there'd be some
bisection drift if that happens?


Attachments:
(No filename) (390.00 B)
signature.asc (499.00 B)
Download all attachments

2023-11-30 02:29:16

by AceLan Kao

[permalink] [raw]
Subject: Re: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported

Mark Brown <[email protected]> 於 2023年11月30日 週四 上午5:19寫道:
>
> On Wed, Nov 29, 2023 at 07:46:02AM +0000, Tudor Ambarus wrote:
>
> > You haven't specified who shall take these patches. Is it fine for you
> > if I take just the SPI NOR bits? If you want Mark to queue both:
>
> I can certainly take both. I guess there's no build time dependency so
> we could each take the subsystem specific patch, though there'd be some
> bisection drift if that happens?
Hi Mark,

It'd be better if you could take both of them.
Thanks.

2023-11-30 09:20:58

by Tudor Ambarus

[permalink] [raw]
Subject: Re: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported



On 11/29/23 21:19, Mark Brown wrote:
> On Wed, Nov 29, 2023 at 07:46:02AM +0000, Tudor Ambarus wrote:
>
>> You haven't specified who shall take these patches. Is it fine for you
>> if I take just the SPI NOR bits? If you want Mark to queue both:
>
> I can certainly take both. I guess there's no build time dependency so
> we could each take the subsystem specific patch, though there'd be some
> bisection drift if that happens?

Right, please take both then. Thanks!