From patchwork Fri Sep 10 03:10:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12484271 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=unavailable 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 D7D15C433EF for ; Fri, 10 Sep 2021 03:10:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 87C8D6113A for ; Fri, 10 Sep 2021 03:10:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 87C8D6113A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 2A2C66B0075; Thu, 9 Sep 2021 23:10:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 252FE900002; Thu, 9 Sep 2021 23:10:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1415E6B007B; Thu, 9 Sep 2021 23:10:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0101.hostedemail.com [216.40.44.101]) by kanga.kvack.org (Postfix) with ESMTP id 067506B0075 for ; Thu, 9 Sep 2021 23:10:32 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A934C30C8D for ; Fri, 10 Sep 2021 03:10:31 +0000 (UTC) X-FDA: 78570185862.17.CFEEC09 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf03.hostedemail.com (Postfix) with ESMTP id 5C165300009B for ; Fri, 10 Sep 2021 03:10:31 +0000 (UTC) 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 Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=yixCbiYI; spf=pass (imf03.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 5C165300009B X-Stat-Signature: c1iw3e3k5roh8ux7kez6w77o8x51b7g5 X-HE-Tag: 1631243431-384593 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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__};