Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52958 )
Change subject: buspirate_spi.c: Refactor singleton states into reentrant pattern ......................................................................
Patch Set 4:
(2 comments)
File buspirate_spi.c:
https://review.coreboot.org/c/flashrom/+/52958/comment/f77b1a7f_f4769fa8 PS3, Line 329: unsigned char *bp_commbuf = NULL; : int bp_commbufsize = 0; :
Nit, `NULL`/`0` should never be consumed, so the initializations are unnecessary.
Done
https://review.coreboot.org/c/flashrom/+/52958/comment/31a9e373_32bbcd51 PS3, Line 695: /* Storing the latest values into data, commbuf migth have grown during init. */ : bp_data->bp_commbuf = bp_commbuf; : bp_data->bp_commbufsize = bp_commbufsize;
In the light of the discussion above, this shouldn't be needed?
Yes, right - because it is done right after buspirate_commbuf_grow and no need to do this anymore, the pointer and the size won't change (only buspirate_commbuf_grow changes them).