Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37202 )
Change subject: libpayload: Make pci and endian handling -Wconversion safe ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/37202/1/payloads/libpayload/include... File payloads/libpayload/include/endian.h:
https://review.coreboot.org/c/coreboot/+/37202/1/payloads/libpayload/include... PS1, Line 44: 16_
uint32_t
the entire function is now gone.
https://review.coreboot.org/c/coreboot/+/37202/1/payloads/libpayload/include... File payloads/libpayload/include/pci.h:
https://review.coreboot.org/c/coreboot/+/37202/1/payloads/libpayload/include... PS1, Line 94: #define PCI_DEV(_bus, _dev, _fn) (0x80000000 | \
Could be a good idea, but maybe in a separate patch.
Ack
https://review.coreboot.org/c/coreboot/+/37202/1/payloads/libpayload/libpci/... File payloads/libpayload/libpci/libpci.c:
https://review.coreboot.org/c/coreboot/+/37202/1/payloads/libpayload/libpci/... PS1, Line 43: return pci_read_config8(libpci_to_lb(dev), (uint16_t)pos);
I don't see why `pos` should be signed at all. However, libpci seems to use this interface...
Yes, we're bound to libpci's API