Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • scripts
  • checkpatch.pl
Find file BlameHistoryPermalink
  • Vladimir Zapolskiy's avatar
    checkpatch: fix a number of COMPLEX_MACRO false positives · 6b10df42
    Vladimir Zapolskiy authored Jan 20, 2016
    
    
    A simple search over the kernel souce displays a number of correctly
    defined multiline macro, which generally are used as an array element
    initializer:
    
    % find ../linux -type f | xargs grep -B1 -H '^[:space]*\[.*\\$'
    
    However checkpatch.pl unexpectedly complains about all these macro
    definitions:
    
    % ./scripts/checkpatch.pl --types COMPLEX_MACRO -f include/linux/perf/arm_pmu.h
    
    ERROR: Macros with complex values should be enclosed in parentheses
    +#define PERF_MAP_ALL_UNSUPPORTED					\
    +	 [0 ... PERF_COUNT_HW_MAX - 1] = HW_OP_UNSUPPORTED
    
    The change intends to fix this type of false positives by flattening
    only array members and skipping array element designators.
    
    Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
    Acked-by: default avatarJoe Perches <joe@perches.com>
    Cc: Andy Whitcroft <apw@canonical.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    6b10df42
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7