Attention is currently required from: Anastasia Klimchuk. Edward O'Callaghan 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 1:
(22 comments)
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/52256/comment/9c2d2dda_f49356c3 PS1, Line 108: struct ftdi_context *ftdic_context; instead of making this a pointer how about just `struct ftdi_context ftdic_context;`
https://review.coreboot.org/c/flashrom/+/52256/comment/50e78642_ce2b60cb PS1, Line 168: struct ftdi_context *ftdic = spi_data->ftdic_context; remove
https://review.coreboot.org/c/flashrom/+/52256/comment/6bfcd85d_7d650ddb PS1, Line 186: free(ftdic); remove
https://review.coreboot.org/c/flashrom/+/52256/comment/3f8af588_a2dc4b2c PS1, Line 198: s &
https://review.coreboot.org/c/flashrom/+/52256/comment/5dfcbdca_b2739b63 PS1, Line 322: struct ftdi_context *ftdic; `struct ftdi_context ftdic;`
https://review.coreboot.org/c/flashrom/+/52256/comment/ec787c70_90b0b995 PS1, Line 534: ftdic = calloc(1, sizeof(struct ftdi_context)); : if (!ftdic) { : msg_perr("Unable to allocate memory for ftdi_context.\n"); : return SPI_GENERIC_ERROR; : } remove
https://review.coreboot.org/c/flashrom/+/52256/comment/ad506d08_7dd81e27 PS1, Line 540: ftdic &
https://review.coreboot.org/c/flashrom/+/52256/comment/98c8148d_0e301d3b PS1, Line 542: free(ftdic); remove
https://review.coreboot.org/c/flashrom/+/52256/comment/f864be64_acffd3a7 PS1, Line 546: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/1ec0d13b_69b25f1b PS1, Line 547: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/b8098cff_5a841c94 PS1, Line 551: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/ca612059_0d8644c9 PS1, Line 556: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/89ac3ba3_f6cbf16d PS1, Line 557: free(ftdic); remove
https://review.coreboot.org/c/flashrom/+/52256/comment/1e8b1840_16192fce PS1, Line 561: f ftdic.type
https://review.coreboot.org/c/flashrom/+/52256/comment/d892d295_1ef687d5 PS1, Line 562: ftdic->type ftdic.type
https://review.coreboot.org/c/flashrom/+/52256/comment/0c5c8f19_b7f45a49 PS1, Line 566: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/38225c9a_824cd034 PS1, Line 567: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/e8468ba1_9c79044a PS1, Line 618: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/48836d5c_24beafc1 PS1, Line 626: spi_data->ftdic_context = ftdic; memcpy() the local stack allocated one into the field.
https://review.coreboot.org/c/flashrom/+/52256/comment/d662fd23_da854a27 PS1, Line 639: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/6a2ccfba_6ca30d8e PS1, Line 641: f &
https://review.coreboot.org/c/flashrom/+/52256/comment/74f7e6f4_b1a5c5aa PS1, Line 644: free(ftdic); remove