summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2025-12-15 16:24:02 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2025-12-15 16:24:02 +0300
commitb8304863a3990d0f18c38e5b94191830a63ee1af (patch)
tree3cc8d5d21fd927e8b3f78c43b00f0f389467f48c /scripts/checkpatch.pl
parent63cb6443c7a798467e0a8b154dd8f1f950a5d1d5 (diff)
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff)
downloadlinux-b8304863a3990d0f18c38e5b94191830a63ee1af.tar.xz
Merge drm/drm-next into drm-intel-next
Sync-up some display code needed for Async flips refactor. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 92669904eecc..c0250244cf7a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -860,6 +860,10 @@ our %deprecated_apis = (
"kunmap" => "kunmap_local",
"kmap_atomic" => "kmap_local_page",
"kunmap_atomic" => "kunmap_local",
+ #These should be enough to drive away new IDR users
+ "DEFINE_IDR" => "DEFINE_XARRAY",
+ "idr_init" => "xa_init",
+ "idr_init_base" => "xa_init_flags"
);
#Create a search pattern for all these strings to speed up a loop below
@@ -3345,6 +3349,13 @@ sub process {
}
}
+# Check for auto-generated unhandled placeholder text (mostly for cover letters)
+ if (($in_commit_log || $in_header_lines) &&
+ $rawline =~ /(?:SUBJECT|BLURB) HERE/) {
+ ERROR("PLACEHOLDER_USE",
+ "Placeholder text detected\n" . $herecurr);
+ }
+
# Check for git id commit length and improperly formed commit descriptions
# A correctly formed commit description is:
# commit <SHA-1 hash length 12+ chars> ("Complete commit subject")
@@ -7721,6 +7732,12 @@ sub process {
ERROR("MISSING_SENTINEL", "missing sentinel in ID array\n" . "$here\n$stat\n");
}
}
+
+# check for uninitialized pointers with __free attribute
+ while ($line =~ /\*\s*($Ident)\s+__free\s*\(\s*$Ident\s*\)\s*[,;]/g) {
+ ERROR("UNINITIALIZED_PTR_WITH_FREE",
+ "pointer '$1' with __free attribute should be initialized\n" . $herecurr);
+ }
}
# If we have no input at all, then there is nothing to report on