summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Walle <mwalle@kernel.org>2026-07-13 11:11:42 +0200
committerMichael Walle <mwalle@kernel.org>2026-09-04 10:29:50 +0200
commit0ede46b4f5b38cb43225927abbf088dd568db54e (patch)
treeceb8ecd0adcf36bf777543f6cc093fafaf75d03a /include
parente37ee8734881a7f92dbbeecf8cc129dd8a6a76b8 (diff)
mtd: spi-nor: move flags into spi_nor_flash_parameter
Right now the SFDP parsing code is modifying both members of struct spi_nor_flash_parameter and struct spi_nor. This may lead to inconsistencies if the parsing fails because only the flash parameters are rolled back. To fix this, move the flags into the struct spi_nor_flash_parameter. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260601125438.3481722-1-mwalle%40kernel.org?part=3 Signed-off-by: Michael Walle <mwalle@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/spi-nor.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index e75c1b4cb4c0..099c5016b485 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -365,7 +365,6 @@ struct spi_nor_flash_parameter;
* @read_dummy: the dummy needed by the read operation
* @program_opcode: the program opcode
* @sst_write_second: used by the SST write operation
- * @flags: flag options for the current SPI NOR (SNOR_F_*)
* @read_proto: the SPI protocol for read operations
* @write_proto: the SPI protocol for write operations
* @reg_proto: the SPI protocol for read_reg/write_reg/erase operations
@@ -406,7 +405,6 @@ struct spi_nor {
enum spi_nor_protocol write_proto;
enum spi_nor_protocol reg_proto;
bool sst_write_second;
- u32 flags;
struct sfdp *sfdp;
struct dentry *debugfs_root;
u8 dfs_sr_cache[2];