]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
kernel/params: constify struct kernel_param_ops uses
authorLuis R. Rodriguez <mcgrof@suse.com>
Wed, 27 May 2015 01:39:38 +0000 (11:09 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 28 May 2015 02:02:10 +0000 (11:32 +0930)
commit9c27847dda9cfae7c273cde62becf364f9fa9ea3
treefe0bcaa54807ea65b32f832f0b8afa970a803861
parent28b8d0c8f560300836dff352348e513cdf328e50
kernel/params: constify struct kernel_param_ops uses

Most code already uses consts for the struct kernel_param_ops,
sweep the kernel for the last offending stragglers. Other than
include/linux/moduleparam.h and kernel/params.c all other changes
were generated with the following Coccinelle SmPL patch. Merge
conflicts between trees can be handled with Coccinelle.

In the future git could get Coccinelle merge support to deal with
patch --> fail --> grammar --> Coccinelle --> new patch conflicts
automatically for us on patches where the grammar is available and
the patch is of high confidence. Consider this a feature request.

Test compiled on x86_64 against:

* allnoconfig
* allmodconfig
* allyesconfig

@ const_found @
identifier ops;
@@

const struct kernel_param_ops ops = {
};

@ const_not_found depends on !const_found @
identifier ops;
@@

-struct kernel_param_ops ops = {
+const struct kernel_param_ops ops = {
};

Generated-by: Coccinelle SmPL
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Junio C Hamano <gitster@pobox.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: cocci@systeme.lip6.fr
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
27 files changed:
arch/s390/kernel/perf_cpum_sf.c
arch/x86/kvm/mmu_audit.c
arch/x86/platform/uv/uv_nmi.c
drivers/block/null_blk.c
drivers/char/ipmi/ipmi_watchdog.c
drivers/dma/dmatest.c
drivers/ide/ide.c
drivers/infiniband/ulp/srp/ib_srp.c
drivers/input/misc/ati_remote2.c
drivers/input/mouse/psmouse-base.c
drivers/misc/lis3lv02d/lis3lv02d.c
drivers/mtd/ubi/block.c
drivers/net/wireless/ath/wil6210/main.c
drivers/power/test_power.c
drivers/thermal/intel_powerclamp.c
drivers/tty/hvc/hvc_iucv.c
drivers/tty/sysrq.c
drivers/video/fbdev/uvesafb.c
drivers/virtio/virtio_mmio.c
fs/nfs/super.c
include/linux/moduleparam.h
kernel/params.c
net/sunrpc/auth.c
net/sunrpc/xprtsock.c
security/apparmor/lsm.c
security/integrity/ima/ima_crypto.c
sound/pci/hda/hda_intel.c