[PATCH] checkpatch: adopt new coding style of type-aware kmalloc-family
From: Manuel Ebner
Date: Wed Sep 09 2026 - 11:18:56 EST
Update checkpatch.pl to reflect new type-aware kmalloc-family as
suggested in commit 2932ba8d9c99 ("slab: Introduce kmalloc_obj()
and family")
Add suffix '_obj(s)' and '_flex' to (km)alloc regex-term.
Signed-off-by: Manuel Ebner <manuelebnerli@xxxxxxxxxxx>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f424dafce..66e2b5a01 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -639,7 +639,7 @@ our $logFunctions = qr{(?x:
our $allocFunctions = qr{(?x:
(?:(?:devm_)?
- (?:kv|k|v)[czm]alloc(?:_array)?(?:_node)? |
+ (?:kv|k|v)[czm]alloc(?:_array)?(?:_node)?(?:_objs?)?(?:_flex)? |
kstrdup(?:_const)? |
kmemdup(?:_nul)?) |
(?:\w+)?alloc_skb(?:_ip_align)? |
--
2.54.0