mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
smbus: optimize parse_spd_* functions
Convert calling / return convention for all parse_spd_* functions from
returning the value of spd_info structure to updating the received
reference. This also allows to move / remove some boilerplate code,
like initializing spdi/curspd and setting slot_num.
At the end, print_smbus_startup_info wants curspd to be updated,
so we can do this in a more efficient way.
Before:
text data bss total filename
10784 3887 18 14689 build32/system/smbus.o
10486 4399 18 14903 build64/system/smbus.o
79353 51101 13088 143542 build32/memtest_shared
78438 58077 294432 430947 build64/memtest_shared
After:
text data bss total filename
10379 3871 18 14268 build32/system/smbus.o
9833 4399 18 14250 build64/system/smbus.o
78937 51101 13088 143126 build32/memtest_shared
77782 58077 294432 430291 build64/memtest_shared
gcc-11.3.0.
This commit is contained in:
480
system/smbus.c
480
system/smbus.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user