summaryrefslogtreecommitdiffstats
path: root/src/include/device/pci_rom.h
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-07 13:17:49 -0800
committerLee Leahy <leroy.p.leahy@intel.com>2017-03-10 22:28:35 +0100
commitf00e446e746da54b7cf967deae73cf090f3835eb (patch)
tree54e3b8b61587af5179804491c5e64930852020cf /src/include/device/pci_rom.h
parent86f60a9c8f218fabc784cbed6c1819b7effec31c (diff)
downloadcoreboot-f00e446e746da54b7cf967deae73cf090f3835eb.tar.gz
coreboot-f00e446e746da54b7cf967deae73cf090f3835eb.tar.bz2
coreboot-f00e446e746da54b7cf967deae73cf090f3835eb.zip
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>
Diffstat (limited to 'src/include/device/pci_rom.h')
-rw-r--r--src/include/device/pci_rom.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/device/pci_rom.h b/src/include/device/pci_rom.h
index 3f09778e4b77..decd806e94cf 100644
--- a/src/include/device/pci_rom.h
+++ b/src/include/device/pci_rom.h
@@ -5,7 +5,7 @@
#include <arch/acpi.h>
#define PCI_ROM_HDR 0xAA55
-#define PCI_DATA_HDR (uint32_t) ( ('R' << 24) | ('I' << 16) | ('C' << 8) | 'P' )
+#define PCI_DATA_HDR ((uint32_t) ( ('R' << 24) | ('I' << 16) | ('C' << 8) | 'P' ))
#define PCI_RAM_IMAGE_START 0xD0000
#define PCI_VGA_RAM_IMAGE_START 0xC0000