Attention is currently required from: Nikolai Artemiev. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/53947 )
Change subject: linux_mtd: move global state into programmer data field ......................................................................
Patch Set 3: Code-Review+1
(4 comments)
Patchset:
PS3: Thank you for doing this work, makes me happy :)
File linux_mtd.c:
https://review.coreboot.org/c/flashrom/+/53947/comment/11db57db_f5399676 PS3, Line 365: mtd_data->dev_fp = NULL; Is this line needed? Data is freed below anyway and won't be reused. If init is called again it creates new data. My understanding that was needed before when dev_fp was global var and it could be reused again - but now it's not global anymore.
https://review.coreboot.org/c/flashrom/+/53947/comment/1449c9c7_493348a1 PS3, Line 421: programmer_linux_mtd.data = data; Just to double-check, data has 6 members and none of them is initialised in init function, is this WAI?
https://review.coreboot.org/c/flashrom/+/53947/comment/e5ea1d50_a0f03d35 PS3, Line 431: free(param); Looking at the code, there is no reason to keep param until the very end, it can be freed just before data calloc, right? And then all `goto linux_mtd_init_exit` can become `return 1`s? This needs to be a separate patch of course. Thank you!