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
You need to sign in or sign up before continuing.
  • linux
  • scripts
  • checkpatch.pl
Find file BlameHistoryPermalink
  • Matteo Croce's avatar
    checkpatch.pl: warn on duplicate sysctl local variable · 6a8d76cb
    Matteo Croce authored Jul 16, 2019
    Commit d91bff3011cf ("proc/sysctl: add shared variables for range
    check") adds some shared const variables to be used instead of a local
    copy in each source file.  Warn when a chunk duplicates one of these
    values in a ctl_table struct:
    
        $ scripts/checkpatch.pl 0001-test-commit.patch
        WARNING: duplicated sysctl range checking value 'zero', consider using the shared one in include/linux/sysctl.h
        #27: FILE: arch/arm/kernel/isa.c:48:
        +               .extra1         = &zero,
    
        WARNING: duplicated sysctl range checking value 'int_max', consider using the shared one in include/linux/sysctl.h
        #28: FILE: arch/arm/kernel/isa.c:49:
        +               .extra2         = &int_max,
    
        total: 0 errors, 2 warnings, 14 lines checked
    
    Link: http://lkml.kernel.org/r/20190531131422.14970-1-mcroce@redhat.com
    
    
    Signed-off-by: default avatarMatteo Croce <mcroce@redhat.com>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Cc: Joe Perches <joe@perches.com>
    Cc: Aaron Tomlin <atomlin@redhat.com>
    Cc: Matthew Wilcox <willy@infradead.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    6a8d76cb
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7