History log of /optee_os/scripts/checkpatch_inc.sh (Results 1 – 25 of 26)
Revision Date Author Comments
# 228cf40e 28-Mar-2025 Rouven Czerwinski <r.czerwinski@pengutronix.de>

tree-wide: use /usr/bin/env bash in bash scripts

Some distributions don't provide bash inside of /bin, increase
compatibility by using env to resolve the correct path at runtime.
Fixes running the s

tree-wide: use /usr/bin/env bash in bash scripts

Some distributions don't provide bash inside of /bin, increase
compatibility by using env to resolve the correct path at runtime.
Fixes running the scripts on my NixOS systems.

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 900bf7c6 07-Nov-2024 Yuichi Sugiyama <yuichis@ricsec.co.jp>

pta: veraison_attestation: integrate Veraison remote attestation PTA

Copy remote attestation PTA functionality from the repository:
https://github.com/iisec-suzaki/optee-ra (commit: 80ca8ef), and ma

pta: veraison_attestation: integrate Veraison remote attestation PTA

Copy remote attestation PTA functionality from the repository:
https://github.com/iisec-suzaki/optee-ra (commit: 80ca8ef), and make
the following adjustments for integration:

- Add build configuration for remote attestation PTA by introducing
the CFG_VERAISON_ATTESTATION_PTA option to align with the new naming
convention.
- Replace the custom base64 implementation with the base64 library
added in PR OP-TEE#7007.
- Update QCBOR integration by removing custom QCBOR files and using
the standard library, adjusting paths as necessary.
- Apply region validation improvements introduced in PR OP-TEE#6195.
- Update API calls in sign.c to align with libmbedtls changes from
PR OP-TEE#6151.
- Calculate the required buffer size at runtime to minimize memory
allocation.
- Refactor code to improve readability and maintainability.
- Add SPDX license identifier (BSD-2-Clause) and copyright notice.

Signed-off-by: Yuichi Sugiyama <yuichis@ricsec.co.jp>
Reviewed-by: Thomas Fossati <thomas.fossati@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 79f8990d 04-Dec-2023 Clement Faure <clement.faure@nxp.com>

scripts: checkpatch: fix word splitting in the command

The following would fail with Zsh instead of Bash :
$ source ./scripts/checkpatch_inc.sh
$ checkpatch HEAD
Unknown option: typedefsfile typedef

scripts: checkpatch: fix word splitting in the command

The following would fail with Zsh instead of Bash :
$ source ./scripts/checkpatch_inc.sh
$ checkpatch HEAD
Unknown option: typedefsfile typedefs.checkpatch
Usage: .../scripts/checkpatch.pl [OPTION]... [FILE]

By setting xtrace in the _checkpatch() function, we can see the built
command is interpreted differently depending on the shell:
$CHECKPATCH $CHECKPATCH_OPT $typedefs_opt -
In Zsh:
/scripts/checkpatch.pl '--typedefsfile typedefs.checkpatch' -
In Bash:
/scripts/checkpatch.pl --typedefsfile typedefs.checkpatch -

Bash differs from Zsh when it comes to word splitting for unquoted
parameters expansions.
One solution is to use `eval` to execute the built command.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# f30ea7ca 01-Jul-2022 Marouene Boubakri <marouene.boubakri@nxp.com>

core: riscv: define RISC-V instruction set architecture in encoding.h

Define standard RISC-V instruction opcodes, control and status registers.
This file is auto-generated from riscv-opcodes and it

core: riscv: define RISC-V instruction set architecture in encoding.h

Define standard RISC-V instruction opcodes, control and status registers.
This file is auto-generated from riscv-opcodes and it is subject of
regular updates.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 493b83d9 22-Nov-2021 Ruchika Gupta <ruchika.gupta@linaro.org>

checkpatch_inc.sh: Add elf_common.h in ignore list

The typedef warning in elf_common.h is a false positive
since it is an accepted pattern in this header file.

Signed-off-by: Ruchika Gupta <ruchika

checkpatch_inc.sh: Add elf_common.h in ignore list

The typedef warning in elf_common.h is a false positive
since it is an accepted pattern in this header file.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5dfe80d6 18-Jul-2021 Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

ta: pkcs11: Add script to verify that helpers are present

Extracts list of symbols from include/pkcs11_ta.h and verifies that they
are present in src/pkcs11_helpers.c or are not used.

Signed-off-by

ta: pkcs11: Add script to verify that helpers are present

Extracts list of symbols from include/pkcs11_ta.h and verifies that they
are present in src/pkcs11_helpers.c or are not used.

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 235834c4 28-Feb-2021 Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

scripts: checkpatch_inc.sh: Add CHECKPATCH_OPT for optional arguments

Add new environment variable CHECKPATCH_OPT for configuring common optional
arguments.

In example newer codespell has moved dic

scripts: checkpatch_inc.sh: Add CHECKPATCH_OPT for optional arguments

Add new environment variable CHECKPATCH_OPT for configuring common optional
arguments.

In example newer codespell has moved dictionary to new location.

This allows one to use:

export CHECKPATCH=<path to linux kernel source>/scripts/checkpatch.pl
export CHECKPATCH_OPT=--codespellfile=/usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# cc4de916 21-Jul-2020 Jerome Forissier <jerome@forissier.org>

libutee: add <elf.h>

Preparing for C++ support in TAs.

Adds header file <elf.h> in addition to <elf32.h> and <elf64.h>. This
file defines the various Elf types depending on the current
architecture

libutee: add <elf.h>

Preparing for C++ support in TAs.

Adds header file <elf.h> in addition to <elf32.h> and <elf64.h>. This
file defines the various Elf types depending on the current
architecture. In other words: when building for Aarch32 Elf_* is defined
as Elf32_*, but when building for Aarch64 it is defined as Elf64_*. This
will be useful for programs which need to examine their own structure
via dl_iterate_phdr() (which will come in a later commit).

Note: <elf.h> serves the same purpose as FreeBSD's <sys/elf.h> but does
it differently; the file is not imported from FreeBSD.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 11ec4014 06-May-2020 Maxim Uvarov <maxim.uvarov@linaro.org>

checkpatch: move options to config file

move checkpatch command line options to config file setting.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Acked-by: Jerome Forissier <jerome@forissi

checkpatch: move options to config file

move checkpatch command line options to config file setting.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 6d759136 29-Apr-2020 Etienne Carriere <etienne.carriere@linaro.org>

checkpatch: ignore USLEEP_RANGE

OP-TEE has no usleep_range() function so ignore related checks.
Prevents reports like:

CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-

checkpatch: ignore USLEEP_RANGE

OP-TEE has no usleep_range() function so ignore related checks.
Prevents reports like:

CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst
#30: FILE: core/arch/arm/plat-stm32mp1/pm/psci.c:215:
+ udelay(100);

Suggested-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>

show more ...


# 9c84dd7c 20-Aug-2019 Jens Wiklander <jens.wiklander@linaro.org>

checkpatch: allow string concatenation without space

Adds --ignore CONCATENATED_STRING to checkpatch to allow constructs
like:
DMESG("value1 %"PRIX32" value2 %"PRIX32, v1, v2);

Without this we're f

checkpatch: allow string concatenation without space

Adds --ignore CONCATENATED_STRING to checkpatch to allow constructs
like:
DMESG("value1 %"PRIX32" value2 %"PRIX32, v1, v2);

Without this we're forced to use:
DMESG("value1 %" PRIX32 " value2 %" PRIX32, v1, v2);

Which is a bit harder to read, especially for more complicated cases.

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# afe14747 20-Aug-2019 Jens Wiklander <jens.wiklander@linaro.org>

checkpatch: use --strict option

Uses the --strict option with checkpatch to catch more of the common style
issues. Ignoring the PREFER_KERNEL_TYPES since we are normally not using
those types. CAMEL

checkpatch: use --strict option

Uses the --strict option with checkpatch to catch more of the common style
issues. Ignoring the PREFER_KERNEL_TYPES since we are normally not using
those types. CAMELCASE is also ignored for now since it triggers many false
positives due to the TEE_Result type.

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# ee90f22c 30-Nov-2018 Etienne Carriere <etienne.carriere@linaro.org>

checkpatch: do not check DTS files

DTS files may not conform to OP-TEE OS C-source coding style. This
change makes checkpatch script not the check DTS files.

Signed-off-by: Etienne Carriere <etienn

checkpatch: do not check DTS files

DTS files may not conform to OP-TEE OS C-source coding style. This
change makes checkpatch script not the check DTS files.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 66666258 17-May-2018 Jens Wiklander <jens.wiklander@linaro.org>

checkpatch_inc.sh: ignore lib/libmbedtls

Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>


# 19beec2d 14-May-2018 Jens Wiklander <jens.wiklander@linaro.org>

checkpatch_inc.sh: remove non-existent directories

Removes directories listed in checkpatch_inc.sh that doesn't
exists any longer.

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Etienn

checkpatch_inc.sh: remove non-existent directories

Removes directories listed in checkpatch_inc.sh that doesn't
exists any longer.

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 9d8c378d 16-Apr-2018 Jerome Forissier <jerome.forissier@linaro.org>

checkpatch_inc.sh: fix case of empty commit due to path filtering

If a commit changes only paths that are filtered out by $_CP_EXCL, thus
making the diff empty, 'git format-patch -1 <sha1>' will sho

checkpatch_inc.sh: fix case of empty commit due to path filtering

If a commit changes only paths that are filtered out by $_CP_EXCL, thus
making the diff empty, 'git format-patch -1 <sha1>' will show the parent
commit instead. As a result, checkpatch.sh will check the wrong commit.

Several things are needed to fix the issue:

1. When calling 'git format-patch', specify the commit ID as a range
(<sha1>^..<sha1>) rather than as a single revision with a maximum count
(-1 <sha1>). This avoids showing the wrong commit.
2. Show the commit message then the diff in two steps, because the
above syntax will not print anything if the diff happens to be empty.
3. Tell checkpatch.pl to ignore the "not a unified diff" error which
is triggered if the commit log is not followed by a diff.

Link: https://travis-ci.org/OP-TEE/optee_os/builds/367058383#L2199-L2204
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 070168e2 12-Mar-2018 Jerome Forissier <jerome.forissier@linaro.org>

build: introduce asm-defines-y

The Makefile rules that are used to generate a C header file containing
constants for struct offsets etc. are currently in mk/compile.mk. They
are used by core.mk whic

build: introduce asm-defines-y

The Makefile rules that are used to generate a C header file containing
constants for struct offsets etc. are currently in mk/compile.mk. They
are used by core.mk which sets a variable (asm-defines-file) before it
includes compile.mk. This works well for this purpose, but does not
scale to several files.

There is a use case for platform code to be able to use the asm-defines
mechanism, too. Therefore, introduce a variable that can be used in any
sub.mk: asm-defines-y.

In addition, to avoid duplication, the DEFINE and DEFINES macros are
moved to their own header (core/include/gen-asm-defines.h), with the
added benefit that it can be explicitly excluded from the checkpatch
list and thus not generate any warning on the 'DEFINE' macro needing
parentheses.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# 660fcc53 01-Mar-2018 Jerome Forissier <jerome.forissier@linaro.org>

checkpatch_inc.sh: exclude files with inline assembly

checkpatch.pl produces false errors when given files with inline
assembly [1]. It is best to skip those files entirely.

Link: [1] https://travi

checkpatch_inc.sh: exclude files with inline assembly

checkpatch.pl produces false errors when given files with inline
assembly [1]. It is best to skip those files entirely.

Link: [1] https://travis-ci.org/OP-TEE/optee_os/builds/347435939#L2115
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# b3be2f66 02-Aug-2017 Jerome Forissier <jerome.forissier@linaro.org>

Import zlib v1.2.11

Import the decompression code from zlib v1.2.11. From the project's
README:

"zlib 1.2.11 is a general purpose data compression library. [...] The
data format used by the zlib li

Import zlib v1.2.11

Import the decompression code from zlib v1.2.11. From the project's
README:

"zlib 1.2.11 is a general purpose data compression library. [...] The
data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files rfc1950 (zlib format), rfc1951
(deflate format) and rfc1952 (gzip format)."

This code will be used in a later commit to decompress early TAs.
Only the inflate() function is needed, and the library is configured
without gzip support. The source files that are not required
for inflate() are left aside.

The library is licensed under a permissive license, see `zlib.h`.

Link: http://tools.ietf.org/html/rfc1950
Link: http://tools.ietf.org/html/rfc1951
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...


# c1d47bcf 15-May-2017 Etienne Carriere <etienne.carriere@linaro.org>

checkpatch: support tools not supporting argument --typedefsfile

If one relies on a checkpatch tool that does not support argument
--typedefsfile, the script will fail whereas it could simply run
wi

checkpatch: support tools not supporting argument --typedefsfile

If one relies on a checkpatch tool that does not support argument
--typedefsfile, the script will fail whereas it could simply run
without this extra feature.

Fixes: 1472c996cca6 ("Take some GP types into account when running patch check tool")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 1472c996 10-May-2017 Jerome Forissier <jerome.forissier@linaro.org>

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 caus

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>

show more ...


# 38f23772 21-Feb-2017 Andrew F. Davis <afd@ti.com>

plat-ti: Add AM43xx platform services

The AM43xx ROM has a different monitor API set than DRA7xx/AM57xx
devices, implement these services here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-

plat-ti: Add AM43xx platform services

The AM43xx ROM has a different monitor API set than DRA7xx/AM57xx
devices, implement these services here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# d7d52b01 21-Feb-2017 Andrew F. Davis <afd@ti.com>

plat-ti: Cleanup platform configuration

Reorganize platform configuration to assist in addition of new
platforms. No functional changes.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Joa

plat-ti: Cleanup platform configuration

Reorganize platform configuration to assist in addition of new
platforms. No functional changes.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...


# 5849875f 19-Aug-2015 Andrew F. Davis <afd@ti.com>

monitor: Add support for platform services

Add the capability for a platform to plugin its own services, often
legacy services for compatibility purposes.

Add these services for the dra7xx platform

monitor: Add support for platform services

Add the capability for a platform to plugin its own services, often
legacy services for compatibility purposes.

Add these services for the dra7xx platform.

The file 'api_monitor_index.h' is synced to a an out-of-tree file and
so we should ignore formatting. Add this exeption to checkpatch.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Daniel Allred <d-allred@ti.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 5392ae31 15-Nov-2016 Andrew F. Davis <afd@ti.com>

scripts: Allow overwriting the checkpatch.pl location

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@lina

scripts: Allow overwriting the checkpatch.pl location

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org>
[Rebase on top of master]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


12