Attention is currently required from: Edward O'Callaghan. 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 2:
(23 comments)
Patchset:
PS2: thank you !
File ft2232_spi.c:
https://review.coreboot.org/c/flashrom/+/52256/comment/e4cf2127_098b7881 PS1, Line 108: struct ftdi_context *ftdic_context;
instead of making this a pointer how about just `struct ftdi_context ftdic_context;`
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/42f8b39d_e094fcb8 PS1, Line 168: struct ftdi_context *ftdic = spi_data->ftdic_context;
remove
I modified this line but I keep it because ftdic is used 4 times here.
https://review.coreboot.org/c/flashrom/+/52256/comment/8926ed9d_b62e1759 PS1, Line 186: free(ftdic);
remove
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/d756b4e7_00b228a3 PS1, Line 198: s
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/7702e290_6363250d PS1, Line 322: struct ftdi_context *ftdic;
`struct ftdi_context ftdic;`
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/4823a08d_ac2c2a03 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
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/db0af36b_e3b5b89d PS1, Line 540: ftdic
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/82f60510_2dcc9a45 PS1, Line 542: free(ftdic);
remove
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/d75a8eab_126cca48 PS1, Line 546: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/651d1193_71a61fb2 PS1, Line 547: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/67a68714_8ee2a3df PS1, Line 551: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/5f5a6cad_030a721d PS1, Line 556: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/c4fc9043_2558a401 PS1, Line 557: free(ftdic);
remove
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/f5543ea5_e1c94ef3 PS1, Line 561: f
ftdic. […]
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/d1315459_98fd335c PS1, Line 562: ftdic->type
ftdic. […]
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/57d46a7f_c49b725f PS1, Line 566: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/38f4d8ce_3732642a PS1, Line 567: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/03bcf9b2_64c2f116 PS1, Line 618: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/686290d2_fd4c1081 PS1, Line 626: spi_data->ftdic_context = ftdic;
memcpy() the local stack allocated one into the field.
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/7abdd72a_6009df85 PS1, Line 639: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/43a77e4a_164fe1fa PS1, Line 641: f
&
Done
https://review.coreboot.org/c/flashrom/+/52256/comment/bcdf5041_5aeebbe0 PS1, Line 644: free(ftdic);
remove
Done