From: AceLan Kao <acelan.kao@canonical.com> To: "Tudor Ambarus" <tudor.ambarus@linaro.org>, "Pratyush Yadav" <pratyush@kernel.org>, "Michael Walle" <michael@walle.cc>, "Miquel Raynal" <miquel.raynal@bootlin.com>, "Richard Weinberger" <richard@nod.at>, "Vignesh Raghavendra" <vigneshr@ti.com>, "Mika Westerberg" <mika.westerberg@linux.intel.com>, "Dhruva Gole" <d-gole@ti.com>, linux-mtd@lists.infradead.org, "Mark Brown" <broonie@kernel.org>, "Kamal Dasu" <kamal.dasu@broadcom.com>, "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>, "Mario Kicherer" <dev@kicherer.org>, "Chuanhong Guo" <gch981213@gmail.com>, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported Date: Wed, 29 Nov 2023 14:43:11 +0800 [thread overview] Message-ID: <20231129064311.272422-2-acelan.kao@canonical.com> (raw) In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com> 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 <d-gole@ti.com> Reviewed-by: Michael Walle <michael@walle.cc> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: AceLan Kao <acelan.kao@canonical.com> To: "Tudor Ambarus" <tudor.ambarus@linaro.org>, "Pratyush Yadav" <pratyush@kernel.org>, "Michael Walle" <michael@walle.cc>, "Miquel Raynal" <miquel.raynal@bootlin.com>, "Richard Weinberger" <richard@nod.at>, "Vignesh Raghavendra" <vigneshr@ti.com>, "Mika Westerberg" <mika.westerberg@linux.intel.com>, "Dhruva Gole" <d-gole@ti.com>, linux-mtd@lists.infradead.org, "Mark Brown" <broonie@kernel.org>, "Kamal Dasu" <kamal.dasu@broadcom.com>, "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>, "Mario Kicherer" <dev@kicherer.org>, "Chuanhong Guo" <gch981213@gmail.com>, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported Date: Wed, 29 Nov 2023 14:43:11 +0800 [thread overview] Message-ID: <20231129064311.272422-2-acelan.kao@canonical.com> (raw) In-Reply-To: <20231129064311.272422-1-acelan.kao@canonical.com> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com> 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 <d-gole@ti.com> Reviewed-by: Michael Walle <michael@walle.cc> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Pratyush Yadav <pratyush@kernel.org> Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com> --- 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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2023-11-29 6:43 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-11-29 6:43 [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP AceLan Kao 2023-11-29 6:43 ` AceLan Kao 2023-11-29 6:43 ` AceLan Kao [this message] 2023-11-29 6:43 ` [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported AceLan Kao 2023-11-29 7:46 ` Tudor Ambarus 2023-11-29 7:46 ` Tudor Ambarus 2023-11-29 21:19 ` Mark Brown 2023-11-29 21:19 ` Mark Brown 2023-11-30 2:27 ` AceLan Kao 2023-11-30 2:27 ` AceLan Kao 2023-11-30 9:20 ` Tudor Ambarus 2023-11-30 9:20 ` Tudor Ambarus 2023-11-29 8:40 ` Miquel Raynal 2023-11-29 8:40 ` Miquel Raynal 2023-11-29 7:05 ` [PATCH v7 1/2] spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP Mika Westerberg 2023-11-29 7:05 ` Mika Westerberg 2023-11-29 7:38 ` Tudor Ambarus 2023-11-29 7:38 ` Tudor Ambarus 2023-11-29 8:28 ` Michael Walle 2023-11-29 8:28 ` Michael Walle 2023-11-29 8:39 ` Miquel Raynal 2023-11-29 8:39 ` Miquel Raynal 2023-11-30 14:19 ` Mark Brown 2023-11-30 14:19 ` Mark Brown 2024-03-13 15:40 ` Florian Fainelli 2024-03-13 15:40 ` Florian Fainelli 2024-03-13 15:56 ` Michael Walle 2024-03-13 15:56 ` Michael Walle 2024-03-13 17:13 ` Florian Fainelli 2024-03-13 17:13 ` Florian Fainelli
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=20231129064311.272422-2-acelan.kao@canonical.com \ --to=acelan.kao@canonical.com \ --cc=broonie@kernel.org \ --cc=d-gole@ti.com \ --cc=dev@kicherer.org \ --cc=gch981213@gmail.com \ --cc=j.neuschaefer@gmx.net \ --cc=kamal.dasu@broadcom.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mtd@lists.infradead.org \ --cc=linux-spi@vger.kernel.org \ --cc=michael@walle.cc \ --cc=mika.westerberg@linux.intel.com \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.