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
  • kernel
  • time
  • timer.c
Find file BlameHistoryPermalink
  • Rasmus Villemoes's avatar
    timers: Use __fls in apply_slack() · 9fc4468d
    Rasmus Villemoes authored Oct 02, 2015
    
    
    In apply_slack(), find_last_bit() is applied to a bitmask consisting
    of precisely BITS_PER_LONG bits. Since mask is non-zero, we might as
    well eliminate the function call and use __fls() directly. On x86_64,
    this shaves 23 bytes of the only caller, mod_timer().
    
    This also gets rid of Coverity CID 1192106, but that is a false
    positive: Coverity is not aware that mask != 0 implies that
    find_last_bit will not return BITS_PER_LONG.
    
    Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: John Stultz <john.stultz@linaro.org>
    Link: http://lkml.kernel.org/r/1443771931-6284-1-git-send-email-linux@rasmusvillemoes.dk
    
    
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    9fc4468d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7