Attention is currently required from: Miklós Márton, Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/72154 )
Change subject: ni845x_spi: pass global state through func params ......................................................................
Patch Set 3:
(1 comment)
File ni845x_spi.c:
https://review.coreboot.org/c/flashrom/+/72154/comment/f08a21d4_0216e860 PS2, Line 233: set_io_voltage_mV
This second argument (`set_io_voltage_mV`) contains a pointer to `io_voltage_in_mV` global var. […]
I see, that's a good finding! Then: you need to add one more paragraph in commit message. I think this fits into a commit (as you said "Instead of relying on global variables, pass and use their value or pointer to functions where possible") but better be explicitly mentioned in commit message.
As an example: The usage of `io_voltage_in_mV` global var in `usb8452_spi_set_io_voltage` function is replaced with existing function argument `set_io_voltage_mV` since `set_io_voltage_mV` already contains the pointer to global var.
Miklós please tell us if we are missing something!