linux/drivers/ide
Kees Cook e4dca7b7aa treewide: Fix function prototypes for module_param_call()
Several function prototypes for the set/get functions defined by
module_param_call() have a slightly wrong argument types. This fixes
those in an effort to clean up the calls when running under type-enforced
compiler instrumentation for CFI. This is the result of running the
following semantic patch:

@match_module_param_call_function@
declarer name module_param_call;
identifier _name, _set_func, _get_func;
expression _arg, _mode;
@@

 module_param_call(_name, _set_func, _get_func, _arg, _mode);

@fix_set_prototype
 depends on match_module_param_call_function@
identifier match_module_param_call_function._set_func;
identifier _val, _param;
type _val_type, _param_type;
@@

 int _set_func(
-_val_type _val
+const char * _val
 ,
-_param_type _param
+const struct kernel_param * _param
 ) { ... }

@fix_get_prototype
 depends on match_module_param_call_function@
identifier match_module_param_call_function._get_func;
identifier _val, _param;
type _val_type, _param_type;
@@

 int _get_func(
-_val_type _val
+char * _val
 ,
-_param_type _param
+const struct kernel_param * _param
 ) { ... }

Two additional by-hand changes are included for places where the above
Coccinelle script didn't notice them:

	drivers/platform/x86/thinkpad_acpi.c
	fs/lockd/svc.c

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
2017-10-31 15:30:37 +01:00
..
aec62xx.c
ali14xx.c
alim15x3.c
amd74xx.c
atiixp.c Drivers: ide: Remove typedef atiixp_ide_timing 2014-10-15 14:27:38 -04:00
au1xxx-ide.c ide: drop owner assignment from platform_drivers 2014-10-20 16:20:38 +02:00
buddha.c zorro: ZTWO_VADDR() should return "void __iomem *" 2013-11-26 11:09:07 +01:00
cmd64x.c
cmd640.c cmd640: add __init attribute 2016-07-26 15:25:30 -07:00
cs5520.c ide: remove deprecated use of pci api 2015-04-17 15:32:07 -04:00
cs5530.c
cs5535.c
cs5536.c ide: cs5536: use module_pci_driver() 2013-11-14 18:21:25 -05:00
cy82c693.c
delkin_cb.c drivers/ide/delkin_cb: Convert to module_pci_driver 2013-07-10 12:09:10 -07:00
dtc2278.c
falconide.c
gayle.c ide: drop owner assignment from platform_drivers 2014-10-20 16:20:38 +02:00
hpt366.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ht6560b.c
icside.c ide: icside: remove incorrect initconst annotation 2016-03-20 16:59:27 -04:00
ide_platform.c ide: drop owner assignment from platform_drivers 2014-10-20 16:20:38 +02:00
ide-4drives.c
ide-acpi.c lib/vsprintf.c: remove %Z support 2017-02-27 18:43:47 -08:00
ide-atapi.c block: Change argument type of scsi_req_init() 2017-06-20 19:27:14 -06:00
ide-cd_ioctl.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-cd_verbose.c block: split scsi_request out of struct request 2017-01-27 15:08:35 -07:00
ide-cd.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-cd.h block: split out request-only flags into a new namespace 2016-10-28 08:45:17 -06:00
ide-cs.c
ide-devsets.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-disk_ioctl.c
ide-disk_proc.c
ide-disk.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-disk.h
ide-dma-sff.c
ide-dma.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
ide-eh.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
ide-floppy_ioctl.c
ide-floppy_proc.c
ide-floppy.c ide-floppy: Use blk_rq_is_scsi() 2017-08-18 08:36:58 -06:00
ide-floppy.h
ide-gd.c block: convert to device_add_disk() 2016-06-27 12:26:08 -07:00
ide-gd.h
ide-generic.c Revert "ide: Fix interface autodetection in legacy IDE driver (trial #2)" 2017-01-09 15:27:59 -05:00
ide-io-std.c
ide-io.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
ide-ioctls.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-iops.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ide-legacy.c
ide-lib.c ide,ata: Rename ATA_IDX to ATA_SENSE 2015-03-27 11:59:22 -04:00
ide-park.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-pci-generic.c
ide-pio-blacklist.c drivers: ide: Include appropriate header file in ide-pio-blacklist.c 2014-01-28 23:35:09 -08:00
ide-pm.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-pnp.c PNP: ide/ide-pnp: Use module_pnp_driver to register driver 2015-03-18 22:39:17 +01:00
ide-probe.c ide: free hwif->portdev on hwif_init() failure 2017-10-03 13:36:17 -05:00
ide-proc.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
ide-scan-pci.c ide: fix IRQ assignment for PCI bus order probing 2017-10-03 14:03:31 -05:00
ide-sysfs.c ide: convert bus code to use dev_groups 2013-10-16 18:40:57 -07:00
ide-tape.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-taskfile.c block: Make most scsi_req_init() calls implicit 2017-06-20 19:27:14 -06:00
ide-timings.c ide: avoid warning for timings calculation 2017-07-21 04:37:22 +01:00
ide-xfer-mode.c
ide.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
it821x.c ide: constify ide_dma_ops structures 2016-01-18 14:12:33 -05:00
it8172.c
it8213.c
jmicron.c
Kconfig block: make scsi_request and scsi ioctl support optional 2017-01-31 10:53:05 -07:00
macide.c
Makefile Remove celleb-only SCC PATA drivers 2015-04-14 13:07:17 -04:00
ns87415.c
opti621.c
palm_bk3710.c ide: palm_bk3710: add __initdata to palm_bk3710_port_info 2017-02-27 20:43:26 -05:00
pdc202xx_new.c PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
pdc202xx_old.c
piix.c
pmac.c ide: pmac: Convert to using %pOF instead of full_name 2017-09-01 16:42:51 +10:00
q40ide.c
qd65xx.c
qd65xx.h
rapide.c
rz1000.c
sc1200.c
serverworks.c
setup-pci.c ide: pci: free PCI BARs on initialization failure 2017-10-03 14:02:57 -05:00
sgiioc4.c ide: remove deprecated use of pci api 2015-04-17 15:32:07 -04:00
siimage.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
sis5513.c block: split scsi_request out of struct request 2017-01-27 15:08:35 -07:00
sl82c105.c
slc90e66.c
tc86c001.c
triflex.c
trm290.c ide: constify ide_dma_ops structures 2016-01-18 14:12:33 -05:00
tx4938ide.c ide: drop owner assignment from platform_drivers 2014-10-20 16:20:38 +02:00
tx4939ide.c ide: drop owner assignment from platform_drivers 2014-10-20 16:20:38 +02:00
umc8672.c
via82cxxx.c