Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe-arm64
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomai
  • ipipe-arm64
  • Repository
Switch branch/tag
  • ipipe-arm64
  • fs
  • sysfs
  • file.c
Find file BlameHistoryPermalink
  • Emese Revfy's avatar
    Driver core: Constify struct sysfs_ops in struct kobj_type · 52cf25d0
    Emese Revfy authored Jan 19, 2010
    
    
    Constify struct sysfs_ops.
    
    This is part of the ops structure constification
    effort started by Arjan van de Ven et al.
    
    Benefits of this constification:
    
     * prevents modification of data that is shared
       (referenced) by many other structure instances
       at runtime
    
     * detects/prevents accidental (but not intentional)
       modification attempts on archs that enforce
       read-only kernel data at runtime
    
     * potentially better optimized code as the compiler
       can assume that the const data cannot be changed
    
     * the compiler/linker move const data into .rodata
       and therefore exclude them from false sharing
    Signed-off-by: default avatarEmese Revfy <re.emese@gmail.com>
    Acked-by: default avatarDavid Teigland <teigland@redhat.com>
    Acked-by: default avatarMatt Domsch <Matt_Domsch@dell.com>
    Acked-by: default avatarMaciej Sosnowski <maciej.sosnowski@intel.com>
    Acked-by: default avatarHans J. Koch <hjk@linutronix.de>
    Acked-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
    Acked-by: default avatarJens Axboe <jens.axboe@oracle.com>
    Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    52cf25d0

Imprint & Privacy Policy