diff mbox series

[RESEND] checkpatch: add *_ON_STACK to declaration_macros

Message ID 1513758679-14532-1-git-send-email-gilad@benyossef.com
State New
Headers show
Series [RESEND] checkpatch: add *_ON_STACK to declaration_macros | expand

Commit Message

Gilad Ben-Yossef Dec. 20, 2017, 8:31 a.m. UTC
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);

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>

---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4

Comments

Greg Kroah-Hartman Dec. 20, 2017, 9:33 a.m. UTC | #1
On Wed, Dec 20, 2017 at 08:31:19AM +0000, Gilad Ben-Yossef wrote:
> 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);

> 

> Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>


Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff mbox series

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 168687a..e7fa1a2 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -759,6 +759,7 @@  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+)?[A-Z_]*_ON_STACK\(|
 	(?:$Storage\s+)?${Type}\s+uninitialized_var\s*\(
 )};