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
  • justinstitt@google.com's avatar
    checkpatch: add ethtool_sprintf rules · 9b5f621c
    justinstitt@google.com authored Dec 06, 2023
    
    
    Add some warnings for using ethtool_sprintf() where a simple
    ethtool_puts() would suffice.
    
    The two cases are:
    
    1) Use ethtool_sprintf() with just two arguments:
    |       ethtool_sprintf(&data, driver[i].name);
    or
    2) Use ethtool_sprintf() with a standalone "%s" fmt string:
    |       ethtool_sprintf(&data, "%s", driver[i].name);
    
    The former may cause -Wformat-security warnings while the latter is just
    not preferred. Both are safely in the category of warnings, not errors.
    
    Signed-off-by: default avatarJustin Stitt <justinstitt@google.com>
    Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9b5f621c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7