From patchwork Mon Jan 8 08:15:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 123686 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2439103qgn; Mon, 8 Jan 2018 00:25:03 -0800 (PST) X-Google-Smtp-Source: ACJfBot+Tpk1tt4hfAg80A6mpRZgMlnyAWVB7rY9134eKqvtbqOv+6lP9HUMyIO2sZOrvArnKrhw X-Received: by 10.98.47.133 with SMTP id v127mr9944015pfv.237.1515399903800; Mon, 08 Jan 2018 00:25:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515399903; cv=none; d=google.com; s=arc-20160816; b=ffphf1WeD4VeorQ6xPJoLKAdvz8RcCsWK9haQxS6am8tuMNuIj4vno2TlKAvTBkP3i Gg1yM1oa5I62NxHqSTd9oVSg4AahlOFPh5X9FRGYsbJ6JyIrPLnM7JjuEKJOFqN7TSh8 fvWfXLji/HIh42WHI8MFcU3s5DwU3BCaPdEP8wziDLg/E3Hr4SW0YMH4HddaPETM+Fz8 PGTWuV5+bHFHHOf0IQXsMU5vldxFO2VDysDgwBSn8WYJK87qU+i6jAr9bGstwrlPEdWp OrRvVIHdr97VHzhCrRXzLm9JHmDI/gikgjhTijFBVQiRMf7ekVwQUttZ464yr4SFGI+7 Eo8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=b9pwG753+QrL96P4nAacd3u5j4RMbXDwnY//ij5ExtQ=; b=zjHo9OOQESH89xRG3nuPupMQtJTvWTdNhLAoVOs2XPM0mXuzXBm6Cyrn1SD0LS2sqN 1C2RYJSZRdiURy9DNZCmIYKJO5v+zC9vqPe5IStTS9YUcE4CnO5d8BSk4gJu3e3ela54 Xdfm0yuEy7Gn+wj8WrzB56jG4L1s9da9KOjbc9d4P64442/7Vkx0Iem1PaIqnNNeZAGN FWt4UR/eOeYIMopgxY8+R1eFejy9oxFh/SQwiWpD3ASlc89/24tr/3gAipXx50DB4x7R azan0R/lZ8foYxunymPG54sIyN6PPcReeuidXWTK7EggWjxCBa7q70j/8Z2FDKXB+SP7 GrOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si7175650pgq.667.2018.01.08.00.25.03; Mon, 08 Jan 2018 00:25:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755960AbeAHIZB (ORCPT + 28 others); Mon, 8 Jan 2018 03:25:01 -0500 Received: from foss.arm.com ([217.140.101.70]:35326 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755133AbeAHIZA (ORCPT ); Mon, 8 Jan 2018 03:25:00 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4A8D71529; Mon, 8 Jan 2018 00:25:00 -0800 (PST) Received: from sugar.kfn.arm.com (unknown [10.45.48.144]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0BA2A3F318; Mon, 8 Jan 2018 00:24:58 -0800 (PST) From: Gilad Ben-Yossef To: Andy Whitcroft , Joe Perches Cc: Ofir Drang , linux-kernel@vger.kernel.org Subject: [PATCH v2] checkpatch: add Crypto ON_STACK to declaration_macros Date: Mon, 8 Jan 2018 08:15:08 +0000 Message-Id: <1515399309-16216-1-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the crypto API *_ON_STACK to $declaration_macros. Resolves the following false warning: WARNING: Missing a blank line after declarations + int err; + SHASH_DESC_ON_STACK(desc, ctx_p->shash_tfm); Acked-by: Greg Kroah-Hartman Signed-off-by: Gilad Ben-Yossef --- Changes from v1: - Use a better regular expression as suggested by Joe Perches. scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d246405..856db0a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -791,7 +791,8 @@ our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant|$String)}; our $declaration_macros = qr{(?x: (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(| (?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(| - (?:$Storage\s+)?${Type}\s+uninitialized_var\s*\( + (?:$Storage\s+)?${Type}\s+uninitialized_var\s*\(| + (?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\( )}; sub deparenthesize {