diff options
author | Sam Hurst <shurst@google.com> | 2017-02-21 14:16:21 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-02-25 02:08:37 -0800 |
commit | fc75244eb90920d6c4954586d00f15fe511d0c11 (patch) | |
tree | 98b8c08ecdfa4396754cf21635ce3f9658769d93 /PRESUBMIT.cfg | |
parent | 26a2ff77d09d6c8846267d9f908a913aaf63f737 (diff) | |
download | chrome-ec-fc75244eb90920d6c4954586d00f15fe511d0c11.tar.gz |
ec:Add presubmit hook to enforce host command definitions
Make sure all public and private host commands starting with
EC_CMD_ and EC_PRV_CMD_ are properly formed
BUG=chromium:681240
TEST=manual.
Added following host commands and verified that they were flagged
#define EC_CMD_TESTA 1234
#define EC_CMD_TESTB 0xabcd
#define EC_CMD_TESTC 0x1ABCD
#define EC_CMD_TESTD 0xXEF01
#define EC_PRV_CMD_TESTA 1234
#define EC_PRV_CMD_TESTB 0xabcd
#define EC_PRV_CMD_TESTC 0x1ABCD
#define EC_PRV_CMD_TESTD 0XEF01
These were also flagged by the script
include/ec_commands.h:#define EC_CMD_ACPI_READ 0x80
include/ec_commands.h:#define EC_CMD_ACPI_WRITE 0x81
include/ec_commands.h:#define EC_CMD_ACPI_BURST_ENABLE 0x82
include/ec_commands.h:#define EC_CMD_ACPI_BURST_DISABLE 0x83
include/ec_commands.h:#define EC_CMD_ACPI_QUERY_EVENT 0x84
CQ-DEPEND=CL:445809
BRANCH=none
Change-Id: I4630d6a887ed289a68178e8f1a8f07f5141c80bc
Reviewed-on: https://chromium-review.googlesource.com/445811
Commit-Ready: Sam Hurst <shurst@google.com>
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'PRESUBMIT.cfg')
-rw-r--r-- | PRESUBMIT.cfg | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/PRESUBMIT.cfg b/PRESUBMIT.cfg index 57b98a6b1a..9473bdbc41 100644 --- a/PRESUBMIT.cfg +++ b/PRESUBMIT.cfg @@ -12,3 +12,4 @@ checkpatch_check: --no-tree --ignore=MSLEEP,VOLATILE [Hook Scripts] hook0 = util/presubmit_check.sh 2>&1 hook1 = util/config_option_check.py 2>&1 +hook2 = util/host_command_check.sh 2>&1 |