Attention is currently required from: Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/66654 )
Change subject: tree: Change signature of extract_programmer_param_str() ......................................................................
Patch Set 6:
(1 comment)
File atavia.c:
https://review.coreboot.org/c/flashrom/+/66654/comment/58dd3256_d832ca04 PS6, Line 148: NULL
Not sure if that would have caught the multiple foot shotguns while unraveling that technical debt. […]
The idea of having a special macro for `NULL` is so that it can be grepped for. Once the refactoring is done, the macro should not be used anywhere.
Nico also suggested another approach a long time ago, but it didn't seem to gain much traction. Probably because of animosity, which is unfortunate... The idea is simple: change the code in the opposite order. That is, start with passing a (non-NULL) pointer to a `programmer_cfg` to `programmer_init()` functions, then plumb the new parameter into each programmer until it reaches `extract_programmer_param_str()`.
In any case, the end result would be the same, but the journey would be different and (hopefully) smoother. We decided to write down this comment so that everyone can learn from this. 😄