coreboot-kgpe-d16/src/include
Julius Werner 2aedc9776a assert.h: Try to evaluate assertions at compile time
Many places in coreboot seem to like to do things like

 assert(CONFIG(SOME_KCONFIG));

This is somewhat suboptimal since assert() is a runtime check, so you
don't see that this fails until someone actually tries to boot it even
though the compiler is totally aware of it already. We already have the
dead_code() macro to do this better:

 if (CONFIG(SOME_KCONFIG))
   dead_code();

Rather than fixing all these and trying to carefully educate people
about which type of check is more appropriate in what situation, we can
just employ the magic of __builtin_constant_p() to automatically make
the former statement behave like the latter.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I06691b732598eb2a847a17167a1cb92149710916
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44044
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-08-03 05:15:59 +00:00
..
acpi ACPI S3: Clean up resume path 2020-07-28 10:37:28 +00:00
boot src/include: Add missing includes 2020-07-26 21:37:35 +00:00
console include/console/usb.h: Drop dead code 2020-07-09 23:51:09 +00:00
cpu src/include: Add missing includes 2020-07-26 21:37:35 +00:00
device device: Add find_dev_nested_path helper function 2020-07-28 19:28:22 +00:00
efi treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pc80 src/include: Add missing includes 2020-07-26 21:37:35 +00:00
smp smp/spinlock: Do not define barrier() globally 2020-07-26 21:00:29 +00:00
superio src/include: Add missing includes 2020-07-26 21:37:35 +00:00
sys
adainit.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
assert.h assert.h: Try to evaluate assertions at compile time 2020-08-03 05:15:59 +00:00
b64_decode.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
base3.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bcd.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
boardid.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
boot_device.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootblock_common.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootmem.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootmode.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootsplash.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootstate.h src/include: Remove unused 'include <stdint.h>' 2020-07-26 20:59:16 +00:00
cbfs.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
cbmem.h arch/x86: Drop CBMEM_TOP_BACKUP 2020-07-11 14:48:25 +00:00
cper.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
crc_byte.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
ctype.h
delay.h
device_tree.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
dimm_info_util.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
edid.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
elog.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
endian.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
espi.h Remove new additions of "this file is part of" lines 2020-05-13 08:37:21 +00:00
fallback.h
fit.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
fit_payload.h src/include: Remove unused 'include <stdint.h>' 2020-07-26 20:59:16 +00:00
fmap.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
fw_config.h fw_config: Add firmware configuration interface 2020-06-02 16:40:04 +00:00
gic.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
gpio.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
halt.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
imd.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
input-event-codes.h include/input-event-codes.h: Add Linux input key codes header file 2020-04-13 19:54:30 +00:00
inttypes.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
ip_checksum.h
kconfig.h
lib.h src/include: improve the description of hexstrtobin 2020-07-07 17:27:00 +00:00
list.h src/include: Remove unused 'include <stddef.h>' 2020-07-26 21:37:55 +00:00
main_decl.h
memlayout.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
memory_info.h smbios: Fix type 17 for Windows 10 2020-07-30 22:31:24 +00:00
memrange.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
mrc_cache.h src: Change BOOL CONFIG_ to CONFIG() in comments & strings 2020-07-26 21:20:30 +00:00
nhlt.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
option.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
post.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
program_loading.h ACPI: Clean up some S3 related leftovers 2020-06-18 12:54:46 +00:00
ramdetect.h src/include/ramdetect.h: Add missing includes 2020-07-25 01:25:57 +00:00
random.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
reg_script.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
region_file.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
reset.h
rmodule.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
romstage_handoff.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
rtc.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
rules.h include/rules.h: Add ENV_USER_SPACE definition 2020-07-27 21:00:23 +00:00
sar.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
sdram_mode.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
smbios.h mb/ocp/deltalake: Update SMBIOS type 4 -- Processor Information 2020-07-31 09:30:47 +00:00
smmstore.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
spd.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
spd_bin.h lib/spd_bin: add get_spd_sn function 2020-05-13 12:04:03 +00:00
spd_cache.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
spd_ddr2.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
spi-generic.h treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
spi_bitbang.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
spi_flash.h src: Change BOOL CONFIG_ to CONFIG() in comments & strings 2020-07-26 21:20:30 +00:00
spi_sdcard.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
stage_cache.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
stdarg.h
stdbool.h src/include: Remove unused 'include <stdint.h>' 2020-07-26 20:59:16 +00:00
stddef.h Remove MAYBE_STATIC_BSS and ENV_STAGE_HAS_BSS_SECTION 2020-05-26 15:04:08 +00:00
stdint.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
stdio.h
stdlib.h
string.h lib/string: Add standard strstr() function 2020-08-03 05:12:23 +00:00
swab.h
symbols.h treewide: Replace CONFIG(ARCH_xx) tests 2020-06-17 21:13:09 +00:00
thread.h src/include: Remove unused 'include <stddef.h>' 2020-07-26 21:37:55 +00:00
timer.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
timestamp.h src/include: Add missing includes 2020-07-26 21:37:35 +00:00
trace.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
types.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
uuid.h include/uuid.h: Add missing include 2020-05-28 16:20:40 +00:00
vbe.h
version.h
watchdog.h
wrdd.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00