linux/drivers/pci/pcie
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
..
aer Merge branch 'pci/trivial' into next 2017-09-07 13:24:20 -05:00
aspm.c treewide: Fix function prototypes for module_param_call() 2017-10-31 15:30:37 +01:00
Kconfig PCI/ASPM: Add support for L1 substates 2017-02-14 17:43:51 -06:00
Makefile PCI: Add Precision Time Measurement (PTM) support 2016-08-15 13:44:08 -05:00
pcie-dpc.c PCI/DPC: Add local struct device pointers 2017-08-24 11:30:02 -05:00
pme.c PCI / PM: Fix native PME handling during system suspend/resume 2017-07-13 01:50:07 +02:00
portdrv_acpi.c Merge branches 'pci/dpc', 'pci/resource' and 'pci/thunderbolt' into next 2016-05-03 11:49:21 -05:00
portdrv_bus.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
portdrv_core.c PCI/portdrv: Allocate MSI/MSI-X vector for Downstream Port Containment 2017-06-16 19:19:28 -05:00
portdrv_pci.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
portdrv.h PCI/portdrv: Support multiple interrupts for MSI as well as MSI-X 2017-06-16 18:04:13 -05:00
ptm.c PCI: Add PTM clock granularity information 2016-08-25 08:32:34 -05:00