Attention is currently required from: Felix Singer, Edward O'Callaghan, Angel Pons, Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73039 )
Change subject: flashrom: rewrite flashbuses_to_text() ......................................................................
Patch Set 6: Code-Review+1
(1 comment)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/73039/comment/ad7b74ce_bfcee8f5 PS5, Line 948: if (bustype & (1 << i))
This condition checks if a specific bus is enabled (`bustype` is a bit flag variable). […]
Oh that my question was a silly one, sorry. Of course the condition is needed because there is one specific `bustype` which is a function argument.
I got another thing in mind instead. At the moment code relies on the order of `bustypes` values being the same as in `chipbustype` enum. At the very least, this needs a comment. I don't know if there are better ways. I am worried there are two ordered lists in two different files, but they have to be in the same order. However, we have a unit test which should fail when the order is broken. That's good.
In any case, please add a comment about the order of `bustypes`. Maybe that's enough :)