Attention is currently required from: Jason Glenesk, Marshall Dawson, Felix Held. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49781 )
Change subject: soc/amd/cezanne: add pci_devs.h ......................................................................
Patch Set 1:
(1 comment)
File src/soc/amd/cezanne/include/soc/pci_devs.h:
https://review.coreboot.org/c/coreboot/+/49781/comment/161a9d80_78f36d6d PS1, Line 129: #define DF_F0_DEVFN PCI_DEVFN(DF_DEV, 0) : #define SOC_DF_F0_DEV _SOC_DEV(DF_DEV, 0)
i thought about it, but that wouldn't check if the parameter is in the range where it should be, so […]
Parametrized macros can be helpful in loops. And PCI_DEVFN() and PCI_DEV() already mask the parameters passed to them. If you wanted to do proper range checking, it could be done but with unhealthy amounts of cursed preprocessor-with-asserts.
If you plan on looping over PCI functions, it may be useful to have parametrized macros. If not, then I guess it's not worth the hassle. Since you're the one who develops this platform, it's up to you 😊