xref: /rk3399_ARM-atf/.checkpatch.conf (revision 51d28937502445e73dc1db5d0863946435e9e630)
1f607739cSSandrine Bailleux#
2*51d28937SAntonio Nino Diaz# Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
3f607739cSSandrine Bailleux#
4f607739cSSandrine Bailleux# Redistribution and use in source and binary forms, with or without
5f607739cSSandrine Bailleux# modification, are permitted provided that the following conditions are met:
6f607739cSSandrine Bailleux#
7f607739cSSandrine Bailleux# Redistributions of source code must retain the above copyright notice, this
8f607739cSSandrine Bailleux# list of conditions and the following disclaimer.
9f607739cSSandrine Bailleux#
10f607739cSSandrine Bailleux# Redistributions in binary form must reproduce the above copyright notice,
11f607739cSSandrine Bailleux# this list of conditions and the following disclaimer in the documentation
12f607739cSSandrine Bailleux# and/or other materials provided with the distribution.
13f607739cSSandrine Bailleux#
14f607739cSSandrine Bailleux# Neither the name of ARM nor the names of its contributors may be used
15f607739cSSandrine Bailleux# to endorse or promote products derived from this software without specific
16f607739cSSandrine Bailleux# prior written permission.
17f607739cSSandrine Bailleux#
18f607739cSSandrine Bailleux# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19f607739cSSandrine Bailleux# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20f607739cSSandrine Bailleux# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21f607739cSSandrine Bailleux# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22f607739cSSandrine Bailleux# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23f607739cSSandrine Bailleux# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24f607739cSSandrine Bailleux# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25f607739cSSandrine Bailleux# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26f607739cSSandrine Bailleux# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27f607739cSSandrine Bailleux# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28f607739cSSandrine Bailleux# POSSIBILITY OF SUCH DAMAGE.
29f607739cSSandrine Bailleux#
30f607739cSSandrine Bailleux
31f607739cSSandrine Bailleux#
32f607739cSSandrine Bailleux# Configure how the Linux checkpatch script should be invoked in the context of
33f607739cSSandrine Bailleux# the Trusted Firmware source tree.
34f607739cSSandrine Bailleux#
35f607739cSSandrine Bailleux
36f607739cSSandrine Bailleux# This is not Linux so don't expect a Linux tree!
37f607739cSSandrine Bailleux--no-tree
38f607739cSSandrine Bailleux
39f607739cSSandrine Bailleux# This clarifes the lines indications in the report.
40f607739cSSandrine Bailleux#
41f607739cSSandrine Bailleux# E.g.:
42f607739cSSandrine Bailleux# Without this option, we have the following output:
43f607739cSSandrine Bailleux#      #333: FILE: drivers/arm/gic/arm_gic.c:160:
44f607739cSSandrine Bailleux# So we have 2 lines indications (333 and 160), which is confusing.
45f607739cSSandrine Bailleux# We only care about the position in the source file.
46f607739cSSandrine Bailleux#
47f607739cSSandrine Bailleux# With this option, it becomes:
48f607739cSSandrine Bailleux#      drivers/arm/gic/arm_gic.c:160:
49f607739cSSandrine Bailleux--showfile
50f607739cSSandrine Bailleux
51*51d28937SAntonio Nino Diaz# Don't show some messages like the list of ignored types or the suggestion to
52*51d28937SAntonio Nino Diaz# use "--fix" or report changes to the maintainers.
53*51d28937SAntonio Nino Diaz--quiet
54*51d28937SAntonio Nino Diaz
55f607739cSSandrine Bailleux#
56f607739cSSandrine Bailleux# Ignore the following message types, as they don't necessarily make sense in
57f607739cSSandrine Bailleux# the context of the Trusted Firmware.
58f607739cSSandrine Bailleux#
59f607739cSSandrine Bailleux
60f607739cSSandrine Bailleux# COMPLEX_MACRO generates false positives.
61f607739cSSandrine Bailleux--ignore COMPLEX_MACRO
62f607739cSSandrine Bailleux
63f607739cSSandrine Bailleux# Commit messages might contain a Gerrit Change-Id.
64f607739cSSandrine Bailleux--ignore GERRIT_CHANGE_ID
65f607739cSSandrine Bailleux
66f607739cSSandrine Bailleux# Do not check the format of commit messages, as Github's merge commits do not
67f607739cSSandrine Bailleux# observe it.
68f607739cSSandrine Bailleux--ignore GIT_COMMIT_ID
69f607739cSSandrine Bailleux
70f607739cSSandrine Bailleux# FILE_PATH_CHANGES reports this kind of message:
71f607739cSSandrine Bailleux# "added, moved or deleted file(s), does MAINTAINERS need updating?"
72f607739cSSandrine Bailleux# We do not use this MAINTAINERS file process in TF.
73f607739cSSandrine Bailleux--ignore FILE_PATH_CHANGES
74f607739cSSandrine Bailleux
75f607739cSSandrine Bailleux# AVOID_EXTERNS reports this kind of messages:
76f607739cSSandrine Bailleux# "externs should be avoided in .c files"
77f607739cSSandrine Bailleux# We don't follow this convention in TF.
78f607739cSSandrine Bailleux--ignore AVOID_EXTERNS
79f607739cSSandrine Bailleux
80f607739cSSandrine Bailleux# NEW_TYPEDEFS reports this kind of messages:
81f607739cSSandrine Bailleux# "do not add new typedefs"
82f607739cSSandrine Bailleux# We allow adding new typedefs in TF.
83f607739cSSandrine Bailleux--ignore NEW_TYPEDEFS
84f607739cSSandrine Bailleux
85*51d28937SAntonio Nino Diaz# Avoid "Does not appear to be a unified-diff format patch" message
86*51d28937SAntonio Nino Diaz--ignore NOT_UNIFIED_DIFF
87*51d28937SAntonio Nino Diaz
88f607739cSSandrine Bailleux# VOLATILE reports this kind of messages:
89f607739cSSandrine Bailleux# "Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt"
90f607739cSSandrine Bailleux# We allow the usage of the volatile keyword in TF.
91f607739cSSandrine Bailleux--ignore VOLATILE
92