Take some GP types into account when running patch check tool
When running checkpatch on the OP-TEE code, for instance during the
Travis checks, it happens that we get false warnings and errors caused
by the use of GlobalPlatform typedefs. In the following example, the
patch introduces pointers to functions returning TEE_Result, but
checkpatch won't accept it as a valid type:
$ ./scripts/checkpatch.sh d776721
| tail -1
total: 1 errors, 5 warnings, 555 lines checked
To address such issues, declare our custom types in a local file
(typedefs.checkpatch) and use the new --typedefsfile option provided by
checkpatch.pl.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
This commit is contained in:
parent
ee664c1986
commit
1472c996cc
2 changed files with 4 additions and 1 deletions
|
@ -8,7 +8,8 @@ _CP_EXCL=$(for p in $CHECKPATCH_IGNORE; do echo ":(exclude)$p" ; done)
|
|||
|
||||
function _checkpatch() {
|
||||
$CHECKPATCH --quiet --ignore FILE_PATH_CHANGES \
|
||||
--ignore GERRIT_CHANGE_ID --no-tree -
|
||||
--ignore GERRIT_CHANGE_ID \
|
||||
--typedefsfile typedefs.checkpatch --no-tree -
|
||||
}
|
||||
|
||||
function checkpatch() {
|
||||
|
|
2
typedefs.checkpatch
Normal file
2
typedefs.checkpatch
Normal file
|
@ -0,0 +1,2 @@
|
|||
TEE_Result
|
||||
TEE_UUID
|
Loading…
Add table
Reference in a new issue