From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91ADDC433F5 for ; Fri, 10 Sep 2021 03:10:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A732610E8 for ; Fri, 10 Sep 2021 03:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbhIJDLl (ORCPT ); Thu, 9 Sep 2021 23:11:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:49734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbhIJDLk (ORCPT ); Thu, 9 Sep 2021 23:11:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 03406610C8; Fri, 10 Sep 2021 03:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1631243430; bh=FsXyWtKg/MI8C2VFRym9L2Cr7lpFEQgrqKw46SCfh5Y=; h=Date:From:To:Subject:In-Reply-To:From; b=yixCbiYI/Kx+s/IXwhJ8F+dpt9GOcwIgyvUN8KIp76VAOLO9LC7j6fW3FxVmn2221 fd+ouPKJSCBF7toHejri1DARZZiCvV+eeexr/3w3/h2FOnwZNENS/t3OYEYRVxQuXn yFsSbKN27rdei+68t3TaIUk2yUxX7yDI2f0XlYio= Date: Thu, 09 Sep 2021 20:10:29 -0700 From: Andrew Morton To: akpm@linux-foundation.org, apw@canonical.com, cl@linux.com, danielmicay@gmail.com, dennis@kernel.org, dwaipayanray1@gmail.com, iamjoonsoo.kim@lge.com, joe@perches.com, keescook@chromium.org, linux-mm@kvack.org, lukas.bulwahn@gmail.com, mm-commits@vger.kernel.org, nathan@kernel.org, ndesaulniers@google.com, ojeda@kernel.org, penberg@kernel.org, rientjes@google.com, tj@kernel.org, torvalds@linux-foundation.org, vbabka@suse.cz Subject: [patch 4/9] checkpatch: add __alloc_size() to known $Attribute Message-ID: <20210910031029.aerLRp1SP%akpm@linux-foundation.org> In-Reply-To: <20210909200948.090d4e213ca34b5ad1325a7e@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org From: Kees Cook Subject: 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 --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/scripts/checkpatch.pl~checkpatch-add-__alloc_size-to-known-attribute +++ a/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__}; _