Repository navigation
Makefile: filter the __cleanup_* false positive from checkpatch - #4127
Merged
Merged
Conversation
Contributor
|
Could we use the same filter script for the CI build? Reducing duplication and have a single place to add more filtering if needed. Ah the other commit is not yet in. In this case just EDIT: the original commit is not in yet. Just cherry pick it from my series and add this feature here. I'll drop it from the other series then |
Collaborator
Author
|
Yes. And I commented in PR #4114 that we should do that. |
Contributor
|
Sorry for the confusion, I didn't see the comment in the other PR. |
checkpatch doesn't recognize __cleanup_* declarations (__cleanup_free, __cleanup_fd, ...) as variable declarations, so it misreports "Missing a blank line after declarations" whenever one sits next to another declaration. This is a known, recurring false positive, not a real style issue, and it fails the checkpatch job on any PR that adds adjacent __cleanup_* declarations. Filter that specific warning out of checkpatch's output before deciding pass/fail, instead of ignoring checkpatch's own exit code. Signed-off-by: Daniel Wagner <wagi@monom.org>
Move the CI filter into scripts/checkpatch-filter.pl. CI, "make checkpatch" and "make checkpatch-diff" now use the same copy. Signed-off-by: Martin Belanger <martin.belanger@dell.com>
martin-belanger
force-pushed
the
checkpatch-filter
branch
from
October 7, 2026 14:02
743d26c to
3a51bb0
Compare
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
checkpatch does not recognize _cleanup* declarations as variable declarations and reports "Missing a blank line after declarations". Filter this warning in "make checkpatch" and "make checkpatch-diff", as #4114 does for CI. The filter is a script so that CI can use the same copy.