]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/md/md.c
Driver core: Constify struct sysfs_ops in struct kobj_type
authorEmese Revfy <re.emese@gmail.com>
Tue, 19 Jan 2010 01:58:23 +0000 (02:58 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Mar 2010 01:04:49 +0000 (17:04 -0800)
commit52cf25d0ab7f78eeecc59ac652ed5090f69b619e
tree031d1ffb3890bd69c0260c864c512e0be62ac05c
parent6c1733aca0b48db4d0e660d54976a1cca25b5eaf
Driver core: Constify struct sysfs_ops in struct kobj_type

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: Emese Revfy <re.emese@gmail.com>
Acked-by: David Teigland <teigland@redhat.com>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
54 files changed:
Documentation/kobject.txt
arch/ia64/kernel/topology.c
arch/powerpc/kernel/cacheinfo.c
arch/sh/kernel/cpu/sh4/sq.c
arch/x86/kernel/cpu/intel_cacheinfo.c
arch/x86/kernel/cpu/mcheck/mce_amd.c
block/blk-integrity.c
block/blk-sysfs.c
block/elevator.c
drivers/base/bus.c
drivers/base/class.c
drivers/base/core.c
drivers/base/sys.c
drivers/block/pktcdvd.c
drivers/cpufreq/cpufreq.c
drivers/cpuidle/sysfs.c
drivers/dma/ioat/dma.c
drivers/dma/ioat/dma.h
drivers/edac/edac_device_sysfs.c
drivers/edac/edac_mc_sysfs.c
drivers/edac/edac_pci_sysfs.c
drivers/firmware/edd.c
drivers/firmware/efivars.c
drivers/firmware/iscsi_ibft.c
drivers/firmware/memmap.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_memory.c
drivers/infiniband/core/cm.c
drivers/infiniband/core/sysfs.c
drivers/md/dm-sysfs.c
drivers/md/md.c
drivers/net/ibmveth.c
drivers/net/iseries_veth.c
drivers/parisc/pdc_stable.c
drivers/pci/hotplug/fakephp.c
drivers/pci/slot.c
drivers/uio/uio.c
drivers/uwb/wlp/sysfs.c
drivers/video/omap2/dss/manager.c
drivers/video/omap2/dss/overlay.c
drivers/xen/sys-hypervisor.c
fs/btrfs/sysfs.c
fs/dlm/lockspace.c
fs/ext4/super.c
fs/gfs2/sys.c
fs/ocfs2/cluster/masklog.c
fs/sysfs/file.c
include/linux/kobject.h
kernel/params.c
lib/kobject.c
mm/slub.c
net/bridge/br_private.h
net/bridge/br_sysfs_if.c
samples/kobject/kset-example.c