util/sconfig: Always generate SMBIOS CPP guards
Manually maintaining a list of fields just to avoid printing some unnecessary CPP guards isn't worth the maintenance burden. Instead, always generate these guards, even if they guard nothing. Change-Id: I6c84180d83ac39a895e02d196acb7074eb052d7f Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57459 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
8b98f8bf07
commit
39e029768b
|
@ -1266,11 +1266,8 @@ static void pass1(FILE *fil, FILE *head, struct device *ptr, struct device *next
|
||||||
chip_ins->chip->name_underscore, chip_ins->id);
|
chip_ins->chip->name_underscore, chip_ins->id);
|
||||||
if (next)
|
if (next)
|
||||||
fprintf(fil, "\t.next=&%s,\n", next->name);
|
fprintf(fil, "\t.next=&%s,\n", next->name);
|
||||||
if (ptr->smbios_slot_type || ptr->smbios_slot_data_width ||
|
fprintf(fil, "#if !DEVTREE_EARLY\n");
|
||||||
ptr->smbios_slot_designation || ptr->smbios_slot_length) {
|
fprintf(fil, "#if CONFIG(GENERATE_SMBIOS_TABLES)\n");
|
||||||
fprintf(fil, "#if !DEVTREE_EARLY\n");
|
|
||||||
fprintf(fil, "#if CONFIG(GENERATE_SMBIOS_TABLES)\n");
|
|
||||||
}
|
|
||||||
/* SMBIOS types start at 1, if zero it hasn't been set */
|
/* SMBIOS types start at 1, if zero it hasn't been set */
|
||||||
if (ptr->smbios_slot_type)
|
if (ptr->smbios_slot_type)
|
||||||
fprintf(fil, "\t.smbios_slot_type = %s,\n",
|
fprintf(fil, "\t.smbios_slot_type = %s,\n",
|
||||||
|
@ -1284,11 +1281,8 @@ static void pass1(FILE *fil, FILE *head, struct device *ptr, struct device *next
|
||||||
if (ptr->smbios_slot_length)
|
if (ptr->smbios_slot_length)
|
||||||
fprintf(fil, "\t.smbios_slot_length = %s,\n",
|
fprintf(fil, "\t.smbios_slot_length = %s,\n",
|
||||||
ptr->smbios_slot_length);
|
ptr->smbios_slot_length);
|
||||||
if (ptr->smbios_slot_type || ptr->smbios_slot_data_width ||
|
fprintf(fil, "#endif\n");
|
||||||
ptr->smbios_slot_designation || ptr->smbios_slot_length) {
|
fprintf(fil, "#endif\n");
|
||||||
fprintf(fil, "#endif\n");
|
|
||||||
fprintf(fil, "#endif\n");
|
|
||||||
}
|
|
||||||
fprintf(fil, "};\n");
|
fprintf(fil, "};\n");
|
||||||
|
|
||||||
emit_resources(fil, ptr);
|
emit_resources(fil, ptr);
|
||||||
|
|
Loading…
Reference in New Issue