Stefan Reinauer 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 1:
(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 39: return (uint16_t)((in & 0xFF) << 8) | ((in & 0xFF00) >> 8);
every time I see stuff like this I refer to the byte order fallacy, is there certainty that we need […]
After reading the first paragraph I came to the conclusion that the article is wrong or misguided.
https://review.coreboot.org/c/coreboot/+/37202/1/payloads/libpayload/include... PS1, Line 44: 16_ uint32_t
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 | \
is there any reason for this to be a macro? I know that was the style when we started but ... […]
Could be a good idea, but maybe in a separate patch.