Skip to contentSkip to conversation

checkpatch: Disable more kernel specific checks

PATCH In review Petr Vorel 4 participants 5 messages May 28

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 checkpatch: Disable more kernel specific checks

Disable kernel specific checks:
* BIT_MACRO
mmapstress08.c:26: CHECK: Prefer using the BIT macro => reports against valid #define GRAN_NUMBER (1<<8)

* PREFER_DEFINED_ATTRIBUTE_MACRO
Kernel has various attribute macros, it does not make sense to check without syncing the code
(https://github.com/linux-test-project/ltp/issues/1318).

---
IMHO safe to merge, but sure it can wait after the release.

 .checkpatch.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.checkpatch.conf +1 -1
index 4aa6f709b6..4ca32f333e 100644
@@ -10,7 +10,7 @@
 --strict
 
 # kernel specific
---ignore PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY
+--ignore PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY,BIT_MACRO,PREFER_DEFINED_ATTRIBUTE_MACRO
 
 # TODO: document reason
 --ignore CONST_STRUCT,VOLATILE,FILE_PATH_CHANGES,LONG_LINE,MACRO_ARG_REUSE,MULTIPLE_ASSIGNMENTS
Signature · 5 lines
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#2 lore raw
In reply to Petr Vorel

Hi Petr,

Quoted 4 lines · Petr Vorel

checkpatch: Disable more kernel specific checks

-–ignore PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY
+–ignore PREFER_KERNEL_TYPES,STRCPY,STRLCPY,STRNCPY,BIT_MACRO,PREFER_DEFINED_ATTRIBUTE_MACRO

Both BIT_MACRO and PREFER_DEFINED_ATTRIBUTE_MACRO are confirmed present in scripts/checkpatch.pl, and the rationale for each is clearly documented in the commit message. Good placement in the "kernel specific" ignore group.

All good. Reviewed.

---
Note:

The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
author
#4 lore raw

Hi Cyril, Andrea,

thanks for your ack, merged.

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp