From beada22544637cca54d3738be5ce9fedf3057f07 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Tue, 24 Aug 2021 10:00:17 +1000 Subject: [PATCH] checkpatch: add __alloc_size() to known $Attribute Make sure checkpatch.pl doesn't get confused about finding the __alloc_size attribute on functions. Link: https://lkml.kernel.org/r/20210818214021.2476230-3-keescook@chromium.org Signed-off-by: Kees Cook Suggested-by: Joe Perches Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Lukas Bulwahn Cc: Christoph Lameter Cc: Daniel Micay Cc: David Rientjes Cc: Dennis Zhou Cc: Joonsoo Kim Cc: Miguel Ojeda Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Pekka Enberg Cc: Tejun Heo Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c27d2312cfc30..88cb294dc4472 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -489,7 +489,8 @@ our $Attribute = qr{ ____cacheline_aligned| ____cacheline_aligned_in_smp| ____cacheline_internodealigned_in_smp| - __weak + __weak| + __alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\) }x; our $Modifier; our $Inline = qr{inline|__always_inline|noinline|__inline|__inline__}; -- 2.50.1