Skip to content

constify various _ops structures for 2.6.32 v1

Emese Revfy lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest31 patches 59 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/31Constify struct acpi_dock_ops for 2.6.32 v1drivers/acpi/dock.c drivers/ata/libata-acpi.c drivers/pci/hotplug/acpiphp_glue.c +1 more+9 -90 replies
2/31Constify struct address_space_operations for 2.6.32 v1include/linux/fs.h+17 -174 replies
3/31Constify struct backlight_ops for 2.6.32 v1drivers/acpi/video.c drivers/macintosh/via-pmu-backlight.c drivers/platform/x86/acer-wmi.c +39 more+48 -480 replies
4/31Constify struct block_device_operations for 2.6.32 v1drivers/staging/dst/dcore.c drivers/staging/hv/blkvsc_drv.c include/linux/blkdev.h+13 -130 replies
5/31Constify struct dma_map_ops for 2.6.32 v1arch/ia64/hp/common/hwsw_iommu.c arch/ia64/hp/common/sba_iommu.c arch/ia64/include/asm/dma-mapping.h +32 more+77 -769 replies
6/31Constify struct e1000_mac_operations for 2.6.32 v1drivers/net/e1000e/82571.c drivers/net/e1000e/e1000.h drivers/net/e1000e/es2lan.c +3 more+8 -67 replies
7/31Constify struct e1000_nvm_operations for 2.6.32 v1drivers/net/e1000e/82571.c drivers/net/e1000e/e1000.h drivers/net/e1000e/es2lan.c +4 more+19 -193 replies
8/31Constify struct e1000_phy_operations for 2.6.32 v1drivers/net/e1000e/82571.c drivers/net/e1000e/e1000.h drivers/net/e1000e/es2lan.c +3 more+8 -84 replies
9/31Constify struct extent_io_ops for 2.6.32 v1fs/btrfs/disk-io.c fs/btrfs/extent_io.h fs/btrfs/inode.c+19 -192 replies
10/31Constify struct file_lock_operations for 2.6.32 v1include/linux/fs.h+2 -20 replies
11/31Constify struct file_operations for 2.6.32 v1drivers/acpi/battery.c drivers/char/pty.c drivers/char/tty_io.c +28 more+89 -6314 replies
12/31Constify struct hv_ops for 2.6.32 v1drivers/char/hvc_beat.c drivers/char/hvc_console.c drivers/char/hvc_console.h +7 more+14 -130 replies
13/31Constify struct intel_dvo_dev_ops for 2.6.32 v1drivers/gpu/drm/i915/dvo.h drivers/gpu/drm/i915/dvo_ch7017.c drivers/gpu/drm/i915/dvo_ch7xxx.c +3 more+13 -130 replies
14/31Constify struct item_operations for 2.6.32 v1fs/reiserfs/item_ops.c include/linux/reiserfs_fs.h+18 -180 replies
15/31Constify struct iwl_ops for 2.6.32 v1drivers/net/wireless/iwlwifi/iwl-1000.c drivers/net/wireless/iwlwifi/iwl-3945.c drivers/net/wireless/iwlwifi/iwl-4965.c +3 more+7 -72 replies
16/31Constify struct kgdb_arch for 2.6.32 v1arch/arm/kernel/kgdb.c arch/blackfin/kernel/kgdb.c arch/mips/kernel/kgdb.c +6 more+10 -90 replies
17/31Constify struct kgdb_io for 2.6.32 v1drivers/misc/kgdbts.c drivers/serial/kgdboc.c include/linux/kgdb.h +1 more+16 -160 replies
18/31Constify struct kset_uevent_ops for 2.6.32 v1drivers/base/bus.c drivers/base/core.c drivers/base/memory.c +6 more+14 -140 replies
19/31Constify struct lock_manager_operations for 2.6.32 v1include/linux/fs.h+8 -80 replies
20/31Constify struct microcode_ops for 2.6.32 v1arch/x86/include/asm/microcode.h arch/x86/kernel/microcode_amd.c arch/x86/kernel/microcode_core.c +1 more+12 -120 replies
21/31Constify struct mtrr_ops for 2.6.32 v1arch/x86/kernel/cpu/mtrr/amd.c arch/x86/kernel/cpu/mtrr/centaur.c arch/x86/kernel/cpu/mtrr/cyrix.c +3 more+18 -181 reply
22/31Constify struct neigh_ops for 2.6.32 v1include/net/neighbour.h+6 -63 replies
23/31Constify struct nlmsvc_binding for 2.6.32 v1fs/lockd/svc.c fs/nfsd/lockd.c include/linux/lockd/bind.h+5 -50 replies
24/31Constify struct pci_raw_ops for 2.6.32 v1arch/x86/include/asm/pci_x86.h arch/x86/pci/common.c arch/x86/pci/direct.c +5 more+16 -160 replies
25/31Constify struct platform_hibernation_ops for 2.6.32 v1drivers/acpi/sleep.c include/linux/suspend.h kernel/power/hibernate.c+16 -160 replies
26/31Constify struct platform_suspend_ops for 2.6.32 v1arch/arm/mach-at91/pm.c arch/arm/mach-omap1/pm.c arch/arm/mach-omap2/pm24xx.c +18 more+33 -330 replies
27/31Constify struct snd_ac97_build_ops for 2.6.32 v1include/sound/ac97_codec.h sound/pci/ac97/ac97_codec.c sound/pci/ac97/ac97_patch.c+41 -410 replies
28/31Constify struct super_operations for 2.6.32 v1include/linux/fs.h+22 -222 replies
29/31Constify struct sysfs_ops for 2.6.32 v1arch/ia64/kernel/topology.c arch/powerpc/kernel/cacheinfo.c arch/sh/kernel/cpu/sh4/sq.c +49 more+68 -698 replies
30/31Constify struct usb_mon_operations for 2.6.32 v1drivers/usb/core/hcd.c drivers/usb/core/hcd.h drivers/usb/mon/mon_main.c+8 -80 replies
31/31Constify struct wd_ops for 2.6.32 v1arch/x86/kernel/cpu/perfctr-watchdog.c+7 -50 replies

Reviews trailers per patch

2 of 31 patches have a Reviewed-by or Acked-by.

PatchStephen HemmingerJens AxboePekka EnbergHans J. KochMatt DomschH. Peter AnvinDavid Teigland
1/31
2/31
3/31
4/31
5/31
6/31
7/31
8/31
9/31
10/31
11/31
12/31
13/31
14/31
15/31
16/31
17/31
18/31
19/31
20/31
21/31A-b
22/31
23/31
24/31
25/31
26/31
27/31
28/31
29/31A-b A-b A-b A-b A-b A-b
30/31
31/31

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v1 thread

Cover letter [PATCH 00/31] constify various _ops structures for 2.6.32 v1

Hello everyone!

The following patch series attempts to constify several structures that hold function pointers. This is only the initial batch, there are about over 150 candidate structures, some of which can be constified as well, I plan to submit them in the future.

The list of constified structures in this series:
acpi_dock_ops
address_space_operations
backlight_ops
block_device_operations
dma_map_ops
e1000_mac_operations
e1000_nvm_operations
e1000_phy_operations
extent_io_ops
file_lock_operations
file_operations
hv_ops
intel_dvo_dev_ops
item_operations
iwl_ops
kgdb_arch
kgdb_io
kset_uevent_ops
lock_manager_operations
microcode_ops
mtrr_ops
neigh_ops
nlmsvc_binding
pci_raw_ops
platform_hibernation_ops
platform_suspend_ops
snd_ac97_build_ops
super_operations
sysfs_ops
usb_mon_operations
wd_ops

There are certain exceptions where a given instance of the structure cannot be const, they are marked with a comment in the patch.

The patches compile fine with an allyesconfig kernel on i386 and x86_64.

Please let me know if any of these structures should not be constified and any other issues you see with them.

Thanks,
Emese