2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-04 03:33:58 +08:00
linux-next/drivers/media/pci
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
..
b2c2 media: b2c2: constify pci_device_id 2017-08-09 09:46:30 -04:00
bt8xx media: dst_ca: remove CA_SET_DESCR boilerplate 2017-09-05 06:13:46 -04:00
cobalt media: pci: make i2c_adapter const 2017-08-26 08:41:15 -04:00
cx18 media: cx18: make v4l2_file_operations const 2017-08-27 08:45:49 -04:00
cx88 media: pci: make video_device const 2017-08-27 08:44:58 -04:00
cx23885 media: cx23885: Explicitly list Hauppauge model numbers of HVR-4400 and HVR-5500 2017-08-27 18:13:43 -04:00
cx25821 Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:13:32 -07:00
ddbridge media: ddbridge: fix sparse warnings 2017-08-27 06:36:34 -04:00
dm1105 media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
dt3155 media: pci: make video_device const 2017-08-27 08:44:58 -04:00
ivtv media: pci: make i2c_adapter const 2017-08-26 08:41:15 -04:00
mantis media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
meye media: pci: make video_device const 2017-08-27 08:44:58 -04:00
netup_unidvb media: pci: make i2c_adapter const 2017-08-26 08:41:15 -04:00
ngene media: ngene: constify i2c_algorithm structure 2017-07-20 14:59:58 -04:00
pluto2 media: pluto2: constify pci_device_id 2017-08-09 09:44:46 -04:00
pt1 media: pt1: constify pci_device_id 2017-08-09 09:46:57 -04:00
pt3 media: media/dvb: earth-pt3: fix hang-up in a rare case 2017-07-20 15:01:30 -04:00
saa7134 media: pci: make video_device const 2017-08-27 08:44:58 -04:00
saa7146 media: saa7146: hexium_gemini: constify pci_device_id 2017-08-09 09:50:55 -04:00
saa7164 media: pci: make i2c_adapter const 2017-08-26 08:41:15 -04:00
smipcie media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_* 2017-08-20 10:02:48 -04:00
solo6x10 media: pci: make video_device const 2017-08-27 08:44:58 -04:00
sta2x11 media: pci: make video_device const 2017-08-27 08:44:58 -04:00
ttpci media: ca.h: split typedefs from structs 2017-09-05 05:48:39 -04:00
tw68 media: pci: make video_device const 2017-08-27 08:44:58 -04:00
tw686x treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
tw5864 media: tw5864, fc0011: better handle WARN_ON() 2017-06-24 16:19:27 -03:00
zoran media: zoran: constify pci_device_id 2017-08-09 09:45:18 -04:00
Kconfig [media] pci: Add tw5864 driver 2016-08-24 11:17:22 -03:00
Makefile [media] pci: Add tw5864 driver 2016-08-24 11:17:22 -03:00