switch-coreboot/src
Lee Leahy f00e446e74 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:

#define AZALIA_SUBVENDOR(codec, val)		    \
	(((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: I6e3b6950738e6906851a172ba3a22e3d5af1e35d
Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Reviewed-on: https://review.coreboot.org/18649
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-03-10 22:28:35 +01:00
..
acpi src/acpi: Capitalize ACPI and SATA 2016-07-31 19:25:40 +02:00
arch acpi: Update the ACPI ID for coreboot 2017-03-02 18:53:04 +01:00
commonlib commonlib: Remove space after * 2017-03-10 22:27:51 +01:00
console console: Enable do_printk_va_list for VBOOT 2016-12-27 18:07:39 +01:00
cpu cpu/amd/agesa: Unify init files 2017-03-10 11:06:56 +01:00
device device/dram/ddr2: Add common ddr2 spd decoder 2017-03-10 11:17:27 +01:00
drivers drivers/intel/fsp2_0: Switch from binary to decimal 2017-03-10 20:08:46 +01:00
ec google/chromeec: Add support for cros_ec_keyb device 2017-03-09 07:31:04 +01:00
include src/include: Add parenthesis around macros 2017-03-10 22:28:35 +01:00
lib vboot/tpm2: enable nvmem commits on cr50 when writing firmware secdata 2017-03-09 19:15:03 +01:00
mainboard google/sand: Add devicetree.cb file for sand 2017-03-10 19:48:48 +01:00
northbridge device/dram/ddr2: Add common ddr2 spd decoder 2017-03-10 11:17:27 +01:00
soc soc/intel/common: Pass the minimum possible string length for strncpy 2017-03-10 19:59:58 +01:00
southbridge AGESA: Move heap allocator declarations 2017-03-08 03:20:27 +01:00
superio sio/ite/it8783ef: Return (0) in ACPI _PSC methods 2016-12-13 22:49:24 +01:00
vboot vboot/tpm2: enable nvmem commits on cr50 when writing firmware secdata 2017-03-09 19:15:03 +01:00
vendorcode vboot/tpm2: enable nvmem commits on cr50 when writing firmware secdata 2017-03-09 19:15:03 +01:00
Kconfig src/Kconfig: Move bootblock behavior to arch/x86 as TODO suggested 2017-02-14 19:03:42 +01:00