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

"Michael Walle" <[email protected]>
Newsgroups org.infradead.lists.linux-mtd,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon Jul 6, 2026 at 4:22 PM CEST, Miquel Raynal wrote:
> On 03/07/2026 at 16:29:18 +02, Michael Walle <[email protected]> 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?                                                ^

yeah ;)

>> 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 <[email protected]>

Btw Sashiko found a problem with the new rollback logic [1]. So
expect that there will be at least a v2.

-michael

[1] https://sashiko.dev/#/patchset/20260703143003.1809579-1-mwalle%40kernel.org

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
signature.asc (application/pgp-signature, 297 B)
-----BEGIN PGP SIGNATURE-----

iKgEABMJADAWIQTIVZIcOo5wfU/AngkSJzzuPgIf+AUCaku87BIcbXdhbGxlQGtl
cm5lbC5vcmcACgkQEic87j4CH/gWGwGAh0RJ2eLKgbbbse46YPQft8AK3TXMwDxk
UhRdx3r2MCtpprB4l9rbWQjRbDnzlGstAYClTn+s8IIaRo/TM7xkh2KphHBJ2ep1
Wo5X6OoN0jFbY1+65rkLYYuRi1J+HYBHBzg=
=MkP+
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.