lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231129064311.272422-2-acelan.kao@canonical.com>
Date:   Wed, 29 Nov 2023 14:43:11 +0800
From:   AceLan Kao <acelan.kao@...onical.com>
To:     Tudor Ambarus <tudor.ambarus@...aro.org>,
        Pratyush Yadav <pratyush@...nel.org>,
        Michael Walle <michael@...le.cc>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Dhruva Gole <d-gole@...com>, linux-mtd@...ts.infradead.org,
        Mark Brown <broonie@...nel.org>,
        Kamal Dasu <kamal.dasu@...adcom.com>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        Mario Kicherer <dev@...herer.org>,
        Chuanhong Guo <gch981213@...il.com>, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH v7 2/2] mtd: spi-nor: Stop reporting warning message when soft reset is not suported

From: "Chia-Lin Kao (AceLan)" <acelan.kao@...onical.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@...com>
Reviewed-by: Michael Walle <michael@...le.cc>
Reviewed-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
Acked-by: Pratyush Yadav <pratyush@...nel.org>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@...onical.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ