Attention is currently required from: Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52285 )
Change subject: linux_spi.c: Refactor singleton states into reentrant pattern ......................................................................
Patch Set 3:
(6 comments)
File linux_spi.c:
https://review.coreboot.org/c/flashrom/+/52285/comment/c7e44348_638a1c05 PS3, Line 111: const Why drop it?
Ah, I've seen how it's used below now. Seems to counteract the idea of reentrant, though, doesn't it?
I know you have plans to change the API, so it doesn't really matter now.
https://review.coreboot.org/c/flashrom/+/52285/comment/626751e4_b00e0fa0 PS3, Line 71: (struct linux_spi_data *) Nit, generally no need to cast `void *` to anything.
https://review.coreboot.org/c/flashrom/+/52285/comment/b86dc368_a298271f PS3, Line 72: if (spi_data->fd != -1) Seems impossible to fail?
https://review.coreboot.org/c/flashrom/+/52285/comment/96a9c39b_2df9ba92 PS3, Line 177: -1 Where would this be consumed?
https://review.coreboot.org/c/flashrom/+/52285/comment/b1ab9d52_e66e36f0 PS3, Line 242: ret = SPI_GENERIC_ERROR; FWIW, this and the related definitions are part of the SPI command API and not for initialization.
https://review.coreboot.org/c/flashrom/+/52285/comment/575aacfc_035fc7a5 PS3, Line 260: fd = -1; It's a local variable now, making this dead code.