Age | Commit message (Collapse) | Author |
|
When using BSD queues from <sys/queues.h>, a queue entry is declared
with a macro:
TAILQ_ENTRY(type) var;
This makes checkpatch.pl unhappy because the type is unknown:
WARNING: Missing a blank line after declarations
#52: FILE: core/arch/arm/include/mm/tee_pager.h:32:
+ struct pgt *pgt;
+ TAILQ_ENTRY(tee_pager_area) link;
This patch adds a regular expression to typedefs.chackpatch that
matches the macro part, thus fixing the warning.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
Adds a couple of mbed TLS types to typedefs.checkpatch to avoid the
following warning:
WARNING: Missing a blank line after declarations
#100: FILE: lib/libutee/tee_api_arith_mpi.c:105:
+ const struct bigint_hdr *hdr = (struct bigint_hdr *)bigInt;
+ const mbedtls_mpi_uint *p = (const mbedtls_mpi_uint *)(hdr + 1);
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
Adds missing typedefs from lib/libutee/include/tee_api_types.h to
typedefs.checkpatch. This fixes checkpatch errors such as:
ERROR: need consistent spacing around '*' (ctx:WxV)
#807: FILE: lib/libutee/tee_api_arith_mpi.c:773:
+void TEE_BigIntInitFMMContext(TEE_BigIntFMMContext *context __unused,
^
The file is sorted in reverse alphabetical order, otherwise checkpatch
would ignore some entries that have a common radix (such as TEE_BigInt/
TEE_BigIntFMM/TEE_BigIntFMMContext). Not sure if it is expected or if it
will be fixed in upstream checkpatch at some point.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
|
|
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>
|