linux/drivers/isdn/hardware/mISDN
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
..
avmfritz.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
hfc_multi_8xx.h isdn: hardware: mISDN: Remove reference to CONFIG_8xx 2017-03-16 11:15:14 -07:00
hfc_multi.h mISDN: Added support for fragmentation of E1 interfaces of hfcmulti driver. 2012-04-26 05:21:03 -04:00
hfc_pci.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
hfcmulti.c isdn: mISDN: hfcmulti: constify pci_device_id. 2017-07-15 21:25:56 -07:00
hfcpci.c isdn: mISDN: hfcpci: constify pci_device_id. 2017-07-15 21:25:56 -07:00
hfcsusb.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hfcsusb.h isdn: hfcsusb: constify usb_device_id 2017-08-08 21:38:27 -07:00
iohelper.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
ipac.h mISDN: Support DR6 indication in mISDNipac driver 2016-03-14 15:51:29 -04:00
isar.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
Kconfig isdn: hardware: mISDN: Remove reference to CONFIG_8xx 2017-03-16 11:15:14 -07:00
Makefile mISDN: Add support for Traverse Technologies NETJet PCI cards 2009-07-25 20:22:36 +02:00
mISDNinfineon.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
mISDNipac.c mISDN: remove unnecessary variable assignments 2017-06-08 11:32:53 -04:00
mISDNisar.c isdn: use setup_timer 2017-03-24 12:33:42 -07:00
netjet.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
netjet.h isdn: whitespace coding style cleanup 2012-02-21 09:04:01 -08:00
speedfax.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
w6692.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
w6692.h mISDN: Add driver for Winbond cards 2009-07-25 20:21:28 +02:00