Attention is currently required from: Nico Huber, Edward O'Callaghan, Anastasia Klimchuk, Nikolai Artemiev. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62898 )
Change subject: hwaccess: replace macros by C code ......................................................................
Patch Set 7: Code-Review+1
(5 comments)
File hwaccess.h:
https://review.coreboot.org/c/flashrom/+/62898/comment/8eed63a3_b04ed40e PS7, Line 31: nit: drop blank line
https://review.coreboot.org/c/flashrom/+/62898/comment/5f992ca6_2ccdd39f PS7, Line 38: nit: drop blank line
https://review.coreboot.org/c/flashrom/+/62898/comment/4790dc7f_a1ecb3b6 PS7, Line 69: uint##bits##_t name##bits (const uint##bits##_t value) { return value; } nit: indent macro body for clarity:
#define ___return_same(name, bits) \ uint##bits##_t name##bits (const uint##bits##_t value) { return value; }
https://review.coreboot.org/c/flashrom/+/62898/comment/d04eb458_e4268764 PS7, Line 79: uint##bits##_t name##bits (const uint##bits##_t value) { return swap##bits (value); } Ditto
File hwaccess_endian_big.c:
PS7: Idea: if `__FLASHROM_BIG_ENDIAN__` / `__FLASHROM_LITTLE_ENDIAN__` won't be removed, maybe add some `_Static_assert()` in here? The idea is to mention the CPU native endian inside these endian-specific files, and an assertion would be more useful than a comment.