From db5358b03b22b31447bf514dff459b6fa439bbc0 Mon Sep 17 00:00:00 2001 From: Vladimir Davydov Date: Mon, 15 Aug 2022 15:13:08 +0300 Subject: [PATCH] Suppress UNCOMMENTED_DEFINITION check for disabled_XXX and exhausted_XXX We name function stubs this way. --- checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checkpatch.pl b/checkpatch.pl index a110c91..da6c276 100755 --- a/checkpatch.pl +++ b/checkpatch.pl @@ -4655,8 +4655,8 @@ sub process { # ignore tests } elsif ($realfile =~ /\bbox\.h$/ && $line =~ /^\+\s*(?:$Declare)?\s*box_set_/) { # ignore box_set_XXX in box.h - } elsif ($line =~ /^\+\s*(?:$Declare)?\s*generic_/) { - # generic_XXX functions are stubs so comments are not required + } elsif ($line =~ /^\+\s*(?:$Declare)?\s*(?:generic_|disabled_|exhausted_)/) { + # generic_XXX, disabled_XXX, exhausted_XXX are functions are stubs so comments are not required } elsif ($line =~ /^\+\s*($Declare)?\s*(?:($Ident)\s*\(|\(\s*\*\s*($Ident)\s*\)\s*\(|($Ident)\s*;)/) { # function, function pointer, variable / struct member my $decl = $1;