linux/drivers/media/pci/tw686x
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
..
Kconfig [media] tw686x: Add support for DMA scatter-gather mode 2016-06-28 07:50:09 -03:00
Makefile
tw686x-audio.c [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
tw686x-core.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
tw686x-regs.h [media] tw686x: audio: Allow to configure the period size 2016-06-28 07:52:12 -03:00
tw686x-video.c [media] pci: constify vb2_ops structures 2016-09-19 16:21:42 -03:00
tw686x.h [media] media/pci/tw686x: convert driver to use the new vb2_queue dev field 2016-07-08 14:37:50 -03:00