Mention make targets for checkpatch in documentation.
Signed-off-by: Markus S. Wamser <markus.wamser@mixed-mode.de>
Acked-by: Jerome Forissier <jerome@forissier.org>
diff --git a/building/gits/optee_test.rst b/building/gits/optee_test.rst
index e595b16..a8487ef 100644
--- a/building/gits/optee_test.rst
+++ b/building/gits/optee_test.rst
@@ -193,6 +193,15 @@
****************
See :ref:`coding_standards`.
+The :ref:`optee_os` repository is required to run the checks. It's location may
+be passed using the `OPTEE_OS_PATH` environment variable:
+
+.. code-block:: bash
+
+ export OPTEE_OS_PATH=/path/to/optee_os
+
+In case `OPTEE_OS_PATH` is unset or empty, the dispatcher script will default to `../optee_os`.
+
.. _BSD 2-Clause: http://opensource.org/licenses/BSD-2-Clause
.. _GlobalPlatform Compliance Test suite: https://store.globalplatform.org/product/tee-initial-configuration-test-suite-with-excluded-tests-list-2/
.. _GPL-2.0: http://opensource.org/licenses/GPL-2.0
diff --git a/general/coding_standards.rst b/general/coding_standards.rst
index dfc699f..42e6bb0 100644
--- a/general/coding_standards.rst
+++ b/general/coding_standards.rst
@@ -46,6 +46,14 @@
Please use checkpatch.pl from the Linux kernel git in combination with the local
`checkpatch script`_.
+There are also targets for common use cases in the Makefiles:
+
+.. code-block:: none
+
+ make checkpatch #check staging and working area
+ make checkpatch-staging #check staging area (added, but not committed files)
+ make checkpatch-working #check working area (modified, but not added files)
+
.. _checkpatch script: https://github.com/OP-TEE/optee_os/blob/master/scripts/checkpatch.sh
.. _checkpatch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/scripts/checkpatch.pl
.. _CodingStyle: https://www.kernel.org/doc/html/latest/process/coding-style.html