[PATCH v1 7/8] mtd: spi-nor: push the rollback mechanism into the sfdp module

Miquel Raynal miquel.raynal at bootlin.com
Mon Jul 6 07:22:05 PDT 2026


On 03/07/2026 at 16:29:18 +02, Michael Walle <mwalle at kernel.org> wrote:

> Right now, the core is handling the rollback of the parameters. But it
> doesn't have the knowledge what has to be rolled back. And in fact,
> havent rolled back everything. Push it down to the called function and
> make it mandatory, that this function has no side effects if it fails.
>
> Funny enough, there is a comment in the SFDP table handing code that

handling?                                                ^

> each table parser is responsible to roll back any changes. But none of
> them did. So while add it, expand the logic to that and roll it back for
> them. There is one simple rule though:
>
>   SFDP parsing and fixups may only modify the spi_nor_flash_parameters.

Ok.

Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>



More information about the linux-mtd mailing list