Attention is currently required from: Michał Żygowski, Frans Hendriks, Arthur Heymans, Felix Held, Wim Vervoorn. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59754 )
Change subject: mb/facebook/fbg1701: Remove ONBOARD_SAMSUNG_MEM ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
File src/mainboard/facebook/fbg1701/romstage.c:
https://review.coreboot.org/c/coreboot/+/59754/comment/1f29972f_154417b3 PS3, Line 21: u8 spd_index; : : switch (cpld_read_pcb_version()) { : case 0: /* intentional fallthrough */ : case 1: /* intentional fallthrough */ : case 2: /* intentional fallthrough */ : case 3: /* intentional fallthrough */ : case 4: /* intentional fallthrough */ : case 5: : spd_index = 0; : break; : case 6: /* intentional fallthrough */ : case 7: : spd_index = 1; : break; : default: : spd_index = 2; : break; : } Idea: Put the switch block in a helper function:
static u8 get_spd_index(void) { switch (cpld_read_pcb_version()) { case 0: /* intentional fallthrough */ case 1: /* intentional fallthrough */ case 2: /* intentional fallthrough */ case 3: /* intentional fallthrough */ case 4: /* intentional fallthrough */ case 5: return 0; case 6: /* intentional fallthrough */ case 7: return 1; default: return 2; } }