From 669c2005d37dbc5fbae8e73d314a17a19e6fc0cf Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Tue, 24 Jun 2025 06:16:44 +0200 Subject: [PATCH] checkpatch: add more exceptions Add more rules to ignore, as some of them incorrectly report false positive results, for example in [1]. [1] https://github.com/linux-msm/qdl/actions/runs/15830061230/job/44624781156?pr=37 Signed-off-by: Igor Opaniuk --- .checkpatch.conf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.checkpatch.conf b/.checkpatch.conf index e92f205..84c1ffc 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -1,5 +1,35 @@ --no-tree --strict +--max-line-length=120 --ignore FILE_PATH_CHANGES --ignore EMAIL_SUBJECT --ignore SPLIT_STRING + +# NEW_TYPEDEFS reports "do not add new typedefs" +# typedef struct __attribute__((__packed__)) sparse_header { +--ignore NEW_TYPEDEFS + +# PREFER_DEFINED_ATTRIBUTE_MACRO reports this kind of messages: +# WARNING: Prefer __packed over __attribute__((__packed__)) +--ignore PREFER_DEFINED_ATTRIBUTE_MACRO + +# PREFER_KERNEL_TYPES reports this kind of messages (when using --strict): +# "Prefer kernel type 'u32' over 'uint32_t'" +--ignore PREFER_KERNEL_TYPES + +# BRACES reports this kind of messages: +# braces {} are not necessary for any arm of this statement +--ignore BRACES + +# CAMELCASE reports this kind of messages: +# Avoid CamelCase: +--ignore CAMELCASE + +# AVOID_EXTERNS reports this kind of messages: +# externs should be avoided in .c files +# extern const char *__progname; +--ignore AVOID_EXTERNS + +# COMMIT_LOG_LONG_LINE reports line lengths > 75 in commit log +# Lets ignore this +--ignore COMMIT_LOG_LONG_LINE