coreboot/src/include
Lee Leahy 6794da3340 UPSTREAM: src/include: Add parenthesis around macros
Fix the following error found by checkpatch.pl:

ERROR: Macros with complex values should be enclosed in parentheses

False positives are detected for attribute macros.  An example is:

ERROR: Macros with complex values should be enclosed in parentheses
+#define BOOT_STATE_INIT_ATTR  __attribute__ ((used, section
(".bs_init")))

False positive also generated for macros for linker script files.  An
example is:

ERROR: Macros with complex values should be enclosed in parentheses
+#define CBFS_CACHE(addr, size) \
+       REGION(cbfs_cache, addr, size, 4) \
+       ALIAS_REGION(cbfs_cache, preram_cbfs_cache) \
+       ALIAS_REGION(cbfs_cache, postram_cbfs_cache)

False positives generated for assembly code macros.  An example is:

ERROR: Macros with complex values should be enclosed in parentheses
+#define DECLARE_OPTIONAL_REGION(name) asm (".weak _" #name ", _e" #name
)

False positive detected when macro includes multiple comma separated
values.  The following code is from src/include/device/azalia_device.h:

        (((codec) << 28) | (0x01720 << 8) | ((val) & 0xff)),    \
        (((codec) << 28) | (0x01721 << 8) | (((val) >> 8) & 0xff)), \
        (((codec) << 28) | (0x01722 << 8) | (((val) >> 16) & 0xff)), \
        (((codec) << 28) | (0x01723 << 8) | (((val) >> 24) & 0xff))

TEST=Build and run on Galileo Gen2

Change-Id: I55c349a221e79f80ce4e1659e3e473b4e04444b0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f00e446e74
Original-Change-Id: I6e3b6950738e6906851a172ba3a22e3d5af1e35d
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18649
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/453373
2017-03-11 17:04:38 -08:00
..
boot
console UPSTREAM: src/include: Add parenthesis around macros 2017-03-11 17:04:38 -08:00
cpu UPSTREAM: src/include: Add parenthesis around macros 2017-03-11 17:04:38 -08:00
device UPSTREAM: src/include: Add parenthesis around macros 2017-03-11 17:04:38 -08:00
pc80 UPSTREAM: src/include: Fix unsigned warnings 2017-03-10 10:54:39 -08:00
smp UPSTREAM: src/include: Add space after comma 2017-03-10 10:54:40 -08:00
superio
sys
tpm_lite UPSTREAM: vboot/tpm2: enable nvmem commits on cr50 when writing firmware secdata 2017-03-10 10:54:45 -08:00
adainit.h UPSTREAM: Add option to use Ada code in ramstage 2016-11-07 11:02:52 -08:00
antirollback.h UPSTREAM: src/vboot: mark factory_initialze_tpm() as static 2016-11-14 19:58:42 -08:00
assert.h UPSTREAM: src/include: Move trailing statements to next line 2017-03-10 10:54:39 -08:00
b64_decode.h
base3.h
bcd.h
boardid.h
boot_device.h
bootblock_common.h
bootmem.h
bootmode.h UPSTREAM: vboot: Add new function for logging recovery mode switches 2016-11-14 19:59:45 -08:00
bootstate.h UPSTREAM: src/include: Add space before ( 2017-03-11 17:04:38 -08:00
cbfs.h UPSTREAM: cbfs: Add API to locate a file from specific region 2016-12-10 18:20:34 -08:00
cbmem.h UPSTREAM: src/include: Indent code using tabs 2017-03-10 10:54:40 -08:00
delay.h UPSTREAM: src/include: Fix unsigned warnings 2017-03-10 10:54:39 -08:00
edid.h
elog.h elog: Add all EC event codes 2017-03-09 16:12:27 -08:00
endian.h
fallback.h UPSTREAM: pc80: Move set_boot_successful() 2016-12-16 01:49:05 -08:00
fmap.h
gic.h
gpio.h
halt.h
imd.h
inttypes.h
ip_checksum.h UPSTREAM: lib/compute_ip_checksum: mark data buffer as const 2016-12-08 22:46:57 -08:00
kconfig.h
lib.h
main_decl.h
memlayout.h
memory_info.h UPSTREAM: src/include: Include stdint.h since struct dimm_info uses it 2017-03-06 07:04:31 -08:00
memrange.h UPSTREAM: src/include: Indent code using tabs 2017-03-10 10:54:40 -08:00
nhlt.h UPSTREAM: lib/nhlt: add support for setting the oem_revision 2016-12-02 14:23:05 -08:00
option.h
program_loading.h UPSTREAM: ACPI S3: Remove HIGH_MEMORY_SAVE where possible 2016-11-10 18:31:17 -08:00
random.h UPSTREAM: arch/x86: add functions to generate random numbers 2017-02-21 06:44:33 -08:00
reg_script.h UPSTREAM: src/include: Add space after comma 2017-03-10 10:54:40 -08:00
region_file.h UPSTREAM: lib: add region file support 2016-12-09 03:29:43 -08:00
reset.h
rmodule.h UPSTREAM: src/include: Indent code using tabs 2017-03-10 10:54:40 -08:00
romstage_handoff.h UPSTREAM: lib: put romstage_handoff implementation in own compilation unit 2016-12-02 14:23:00 -08:00
rtc.h
rules.h UPSTREAM: Stage rules.h: Add ENV_LIBAGESA 2017-03-07 04:17:28 -08:00
sar.h UPSTREAM: chromeos: Implement locating and decoding wifi sar data from VPD 2017-01-13 15:21:50 -08:00
sdram_mode.h
smbios.h UPSTREAM: smbios.h: add missing SKU field to type3 table 2016-12-16 07:51:45 -08:00
spd.h
spd_bin.h UPSTREAM: ddr3 spd: move accessor code into lib/spd_bin.c 2017-02-13 10:01:11 -08:00
spd_ddr2.h
spi-generic.h UPSTREAM: spi: Add function callback to get configuration of SPI bus 2017-02-18 03:10:54 -08:00
spi_flash.h UPSTREAM: drivers/spi: provide a mechanism to obtain the SPI flash boot device 2016-12-09 03:29:45 -08:00
stage_cache.h UPSTREAM: arch/x86: cache postcar in stage cache 2016-12-02 14:23:02 -08:00
stddef.h
stdlib.h UPSTREAM: src/include: Add space after comma 2017-03-10 10:54:40 -08:00
string.h UPSTREAM: string.h: only guard snprintf() with __ROMCC__ 2016-11-10 18:31:10 -08:00
swab.h
symbols.h
thread.h UPSTREAM: src/include: Indent code using tabs 2017-03-10 10:54:40 -08:00
timer.h UPSTREAM: src/include: Indent code using tabs 2017-03-10 10:54:40 -08:00
timestamp.h
tpm.h
trace.h
types.h
vbe.h
version.h
watchdog.h UPSTREAM: src/include: Add parenthesis around macros 2017-03-11 17:04:38 -08:00
wrdd.h