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: <20240711-macronix-mx25l3205d-fixups-v3-3-99353461dd2d@geanix.com>
Date: Thu, 11 Jul 2024 15:00:03 +0200
From: Esben Haabendal <esben@...nix.com>
To: Tudor Ambarus <tudor.ambarus@...aro.org>, 
 Pratyush Yadav <pratyush@...nel.org>, Michael Walle <mwalle@...nel.org>, 
 Miquel Raynal <miquel.raynal@...tlin.com>, 
 Richard Weinberger <richard@....at>, Vignesh Raghavendra <vigneshr@...com>, 
 Nicolas Ferre <nicolas.ferre@...rochip.com>, 
 Alexandre Belloni <alexandre.belloni@...tlin.com>, 
 Claudiu Beznea <claudiu.beznea@...on.dev>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org, 
 Rasmus Villemoes <rasmus.villemoes@...vas.dk>, 
 linux-arm-kernel@...ts.infradead.org, Esben Haabendal <esben@...nix.com>
Subject: [PATCH v3 03/15] mtd: spi-nor: Align default_init() handling for
 SPI_NOR_SKIP_SFDP

Currently, flashes declared with size != 0 in struct flash_info and without
SPI_NOR_SKIP_SFDP in no_sfdp_flags is initialized using struct flash_info.

Flashes declared with size != 0 and SPI_NOR_SKIP_SFDP set is handled
similarly, with the only difference being that the ->default_init() hooks
is ignored.

With the only in-tree user of SPI_NOR_SKIP_SFDP is the Spansion s25fl256s0
flash, which does not have either manufacturer or
flash_info ->default_init() hooks, it should be safe to align this, so that
they are handled in the same way.

Signed-off-by: Esben Haabendal <esben@...nix.com>
---
 drivers/mtd/spi-nor/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 39b28700ce28..d58f107f62ec 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -3029,8 +3029,7 @@ static int spi_nor_init_params(struct spi_nor *nor)
 		}
 	} else {
 		spi_nor_no_sfdp_init_params(nor);
-		if (!(nor->info->no_sfdp_flags & SPI_NOR_SKIP_SFDP))
-			spi_nor_manufacturer_init_params(nor);
+		spi_nor_manufacturer_init_params(nor);
 
 		if (spi_nor_try_sfdp(nor))
 			spi_nor_try_sfdp_init_params(nor);

-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ