lkml.org 
[lkml]   [2015]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] checkpatch: Allow longer declaration macros
    From
    Date
    Some really long declaration macros exist.

    For instance;
    DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
    and
    DECLARE_DM_KCOPYD_THROTTLE_WITH_MODULE_PARM(name, description)

    Increase the limit from 2 words to 6 after DECLARE/DEFINE uses.

    Signed-off-by: Joe Perches <joe@perches.com>
    ---
    scripts/checkpatch.pl | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
    index 90e1edc..75737a7 100755
    --- a/scripts/checkpatch.pl
    +++ b/scripts/checkpatch.pl
    @@ -584,7 +584,7 @@ our $LvalOrFunc = qr{((?:[\&\*]\s*)?$Lval)\s*($balanced_parens{0,1})\s*};
    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,2}\s*\(|
    + (?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(|
    (?:$Storage\s+)?LIST_HEAD\s*\(|
    (?:$Storage\s+)?${Type}\s+uninitialized_var\s*\(
    )};



    \
     
     \ /
      Last update: 2015-07-01 17:41    [W:3.003 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site