Attention is currently required from: Nico Huber, Thomas Heijligen, Edward O'Callaghan. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62951 )
Change subject: pcidev: Construct a API to handle phantom pci controllers ......................................................................
Patch Set 3:
(6 comments)
File include/programmer.h:
https://review.coreboot.org/c/flashrom/+/62951/comment/2c55d99b_a7be2e68 PS3, Line 131: pcidev_phantom_spi Can we generalise the names, so that this can be used for any device? Something like `pcidev_phantom_dev` here would work for me, and functions would be renamed accordingly.
https://review.coreboot.org/c/flashrom/+/62951/comment/9a977def_690f922e PS3, Line 132: no space after unary *
https://review.coreboot.org/c/flashrom/+/62951/comment/bf73ba97_c301ef4f PS3, Line 133: no space after unary *
https://review.coreboot.org/c/flashrom/+/62951/comment/6541801f_32b26f67 PS3, Line 132: struct pcidev_phantom_spi * pcidev_phantom_new_spidev(struct pci_dev *const dev, const int slot, const int func); : struct pci_dev * pcidev_phantom_spidev(struct pcidev_phantom_spi *const ph_spidev); : void pcidev_phantom_release(struct pcidev_phantom_spi *const ph_spidev); There's no need to declare parameters as const in the function declaration, the caller doesn't care.
Note: In something like `const char *const str`, only the second `const` is unnecessary. I mentally read `const char *str` as "`str` is a pointer to `const char`".
File pcidev.c:
https://review.coreboot.org/c/flashrom/+/62951/comment/ff8b8932_0e0d62e7 PS3, Line 54: no space after unary *
https://review.coreboot.org/c/flashrom/+/62951/comment/84b3f3a5_462c6fa4 PS3, Line 85: no space after unary *