Files
OpenCellular/src/include
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
..
2017-03-09 17:16:09 +01:00
2017-03-09 17:19:16 +01:00
2015-04-22 08:50:54 +02:00
2017-03-10 22:28:14 +01:00
2017-03-09 17:18:42 +01:00
2017-03-09 17:16:09 +01:00
2016-09-08 23:19:06 +02:00
2017-03-09 18:04:50 +01:00
2016-12-13 19:15:22 +01:00
2016-07-31 18:30:16 +02:00
2016-07-15 08:35:15 +02:00
2012-05-08 00:36:09 +02:00
2016-07-01 23:55:16 +02:00
2017-03-09 17:18:42 +01:00
2016-12-08 16:10:28 +01:00
2016-09-05 12:28:32 +02:00
2017-03-09 17:18:42 +01:00
2016-06-24 20:22:05 +02:00
2017-03-07 00:43:20 +01:00
2016-07-12 15:17:31 +02:00
2016-04-15 16:18:57 +02:00
2017-03-09 17:19:16 +01:00
2013-07-11 22:36:19 +02:00
2017-03-09 17:18:42 +01:00
2017-03-09 17:18:42 +01:00
2016-09-20 17:38:56 +02:00