1*91f16700Schasinglulu# 2*91f16700Schasinglulu# Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved. 3*91f16700Schasinglulu# 4*91f16700Schasinglulu# SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu# 6*91f16700Schasinglulu 7*91f16700Schasinglulu# 8*91f16700Schasinglulu# Configure how the Linux checkpatch script should be invoked in the context of 9*91f16700Schasinglulu# the Trusted Firmware source tree. 10*91f16700Schasinglulu# 11*91f16700Schasinglulu 12*91f16700Schasinglulu# This is not Linux so don't expect a Linux tree! 13*91f16700Schasinglulu--no-tree 14*91f16700Schasinglulu 15*91f16700Schasinglulu# The Linux kernel expects the SPDX license tag in the first line of each file. 16*91f16700Schasinglulu# We don't follow this in the Trusted Firmware. 17*91f16700Schasinglulu--ignore SPDX_LICENSE_TAG 18*91f16700Schasinglulu 19*91f16700Schasinglulu# This clarifes the lines indications in the report. 20*91f16700Schasinglulu# 21*91f16700Schasinglulu# E.g.: 22*91f16700Schasinglulu# Without this option, we have the following output: 23*91f16700Schasinglulu# #333: FILE: drivers/arm/gic/arm_gic.c:160: 24*91f16700Schasinglulu# So we have 2 lines indications (333 and 160), which is confusing. 25*91f16700Schasinglulu# We only care about the position in the source file. 26*91f16700Schasinglulu# 27*91f16700Schasinglulu# With this option, it becomes: 28*91f16700Schasinglulu# drivers/arm/gic/arm_gic.c:160: 29*91f16700Schasinglulu--showfile 30*91f16700Schasinglulu 31*91f16700Schasinglulu# Don't show some messages like the list of ignored types or the suggestion to 32*91f16700Schasinglulu# use "--fix" or report changes to the maintainers. 33*91f16700Schasinglulu--quiet 34*91f16700Schasinglulu 35*91f16700Schasinglulu# 36*91f16700Schasinglulu# Ignore the following message types, as they don't necessarily make sense in 37*91f16700Schasinglulu# the context of the Trusted Firmware. 38*91f16700Schasinglulu# 39*91f16700Schasinglulu 40*91f16700Schasinglulu# COMPLEX_MACRO generates false positives. 41*91f16700Schasinglulu--ignore COMPLEX_MACRO 42*91f16700Schasinglulu 43*91f16700Schasinglulu# Commit messages might contain a Gerrit Change-Id. 44*91f16700Schasinglulu--ignore GERRIT_CHANGE_ID 45*91f16700Schasinglulu 46*91f16700Schasinglulu# Do not check the format of commit messages, as Gerrit's merge commits do not 47*91f16700Schasinglulu# preserve it. 48*91f16700Schasinglulu--ignore GIT_COMMIT_ID 49*91f16700Schasinglulu 50*91f16700Schasinglulu# FILE_PATH_CHANGES reports this kind of message: 51*91f16700Schasinglulu# "added, moved or deleted file(s), does MAINTAINERS need updating?" 52*91f16700Schasinglulu# We do not use this MAINTAINERS file process in TF. 53*91f16700Schasinglulu--ignore FILE_PATH_CHANGES 54*91f16700Schasinglulu 55*91f16700Schasinglulu# AVOID_EXTERNS reports this kind of messages: 56*91f16700Schasinglulu# "externs should be avoided in .c files" 57*91f16700Schasinglulu# We don't follow this convention in TF. 58*91f16700Schasinglulu--ignore AVOID_EXTERNS 59*91f16700Schasinglulu 60*91f16700Schasinglulu# NEW_TYPEDEFS reports this kind of messages: 61*91f16700Schasinglulu# "do not add new typedefs" 62*91f16700Schasinglulu# We allow adding new typedefs in TF. 63*91f16700Schasinglulu--ignore NEW_TYPEDEFS 64*91f16700Schasinglulu 65*91f16700Schasinglulu# Avoid "Does not appear to be a unified-diff format patch" message 66*91f16700Schasinglulu--ignore NOT_UNIFIED_DIFF 67*91f16700Schasinglulu 68*91f16700Schasinglulu# VOLATILE reports this kind of messages: 69*91f16700Schasinglulu# "Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt" 70*91f16700Schasinglulu# We allow the usage of the volatile keyword in TF. 71*91f16700Schasinglulu--ignore VOLATILE 72*91f16700Schasinglulu 73*91f16700Schasinglulu# BRACES reports this kind of messages: 74*91f16700Schasinglulu# braces {} are not necessary for any arm of this statement 75*91f16700Schasinglulu--ignore BRACES 76*91f16700Schasinglulu 77*91f16700Schasinglulu# PREFER_KERNEL_TYPES reports this kind of messages (when using --strict): 78*91f16700Schasinglulu# "Prefer kernel type 'u32' over 'uint32_t'" 79*91f16700Schasinglulu--ignore PREFER_KERNEL_TYPES 80*91f16700Schasinglulu 81*91f16700Schasinglulu# USLEEP_RANGE reports this kind of messages (when using --strict): 82*91f16700Schasinglulu# "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt" 83*91f16700Schasinglulu--ignore USLEEP_RANGE 84*91f16700Schasinglulu 85*91f16700Schasinglulu# COMPARISON_TO_NULL reports this kind of messages (when using --strict): 86*91f16700Schasinglulu# Comparison to NULL could be written "" 87*91f16700Schasinglulu--ignore COMPARISON_TO_NULL 88*91f16700Schasinglulu 89*91f16700Schasinglulu# UNNECESSARY_PARENTHESES reports this kind of messages (when using --strict): 90*91f16700Schasinglulu# Unnecessary parentheses around "" 91*91f16700Schasinglulu--ignore UNNECESSARY_PARENTHESES 92