Attention is currently required from: Edward O'Callaghan, Angel Pons. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52256 )
Change subject: ft2232_spi.c: Refactor singleton states into reentrant pattern ......................................................................
Patch Set 3:
(4 comments)
Patchset:
PS3: thank you for review!
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/52256/comment/813ce735_4a12d818 PS2, Line 614: spi_data = calloc(1, sizeof(struct ft2232_data));
Can calloc() fail?
yes of course, this is my miss
https://review.coreboot.org/c/flashrom/+/52256/comment/a9517581_a9871abd PS2, Line 614: sizeof(struct ft2232_data)
Using type names in sizeof() is discouraged. […]
Thank you! This now looks even better. I will remember this for future.
https://review.coreboot.org/c/flashrom/+/52256/comment/f9181a13_21d05198 PS2, Line 617: memcpy(&spi_data->ftdic_context, &ftdic, sizeof(struct ftdi_context));
It should be possible to do a direct assignment: […]
Direct assignment seems to work.