Attention is currently required from: Nico Huber, Martin L Roth, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk, Nikolai Artemiev. Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62898 )
Change subject: hwaccess: replace macros by C code ......................................................................
Patch Set 6:
(3 comments)
File hwaccess.h:
https://review.coreboot.org/c/flashrom/+/62898/comment/445b23fd_e3e3b711 PS6, Line 34: inline
Okay, I thought you wanted it to always be inline to match what the macro was doing. […]
As a hint. From a C language perspective it's the best to inline it. The compiler may change this afterwards depending on the optimizations enabled and that should also be fine.
https://review.coreboot.org/c/flashrom/+/62898/comment/c0eb4d29_54466b4f PS6, Line 74: * `__return_swapped(cpu_to_be, 8)` typo s/__return/___return/
File hwaccess.h:
https://review.coreboot.org/c/flashrom/+/62898/comment/29230a41_b0c3d12e PS2, Line 84: #define be_to_cpu8 cpu_to_be8 : #define be_to_cpu16 cpu_to_be16 : #define be_to_cpu32 cpu_to_be32 : #define be_to_cpu64 cpu_to_be64 : #define le_to_cpu8 cpu_to_le8 : #define le_to_cpu16 cpu_to_le16 : #define le_to_cpu32 cpu_to_le32 : #define le_to_cpu64 cpu_to_le64 :
IMO, this part seems easy to understand and spares us error-prone […]
The duplications in the .c files are replaced by macros. This should address this issue in adequate way.