Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'modules-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux

Pull module updates from Jessica Yu:
"Summary of modules changes for the 4.15 merge window:

- treewide module_param_call() cleanup, fix up set/get function
prototype mismatches, from Kees Cook

- minor code cleanups"

* tag 'modules-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
module: Do not paper over type mismatches in module_param_call()
treewide: Fix function prototypes for module_param_call()
module: Prepare to convert all module_param_call() prototypes
kernel/module: Delete an error message for a failed memory allocation in add_module_usage()

+92 -87
+1 -1
arch/powerpc/platforms/pseries/cmm.c
··· 742 742 * Return value: 743 743 * 0 on success / other on failure 744 744 **/ 745 - static int cmm_set_disable(const char *val, struct kernel_param *kp) 745 + static int cmm_set_disable(const char *val, const struct kernel_param *kp) 746 746 { 747 747 int disable = simple_strtoul(val, NULL, 10); 748 748
+1 -1
arch/x86/oprofile/nmi_int.c
··· 592 592 593 593 static int force_cpu_type; 594 594 595 - static int set_cpu_type(const char *str, struct kernel_param *kp) 595 + static int set_cpu_type(const char *str, const struct kernel_param *kp) 596 596 { 597 597 if (!strcmp(str, "timer")) { 598 598 force_cpu_type = timer;
+4 -2
drivers/acpi/button.c
··· 573 573 return 0; 574 574 } 575 575 576 - static int param_set_lid_init_state(const char *val, struct kernel_param *kp) 576 + static int param_set_lid_init_state(const char *val, 577 + const struct kernel_param *kp) 577 578 { 578 579 int result = 0; 579 580 ··· 592 591 return result; 593 592 } 594 593 595 - static int param_get_lid_init_state(char *buffer, struct kernel_param *kp) 594 + static int param_get_lid_init_state(char *buffer, 595 + const struct kernel_param *kp) 596 596 { 597 597 switch (lid_init_state) { 598 598 case ACPI_BUTTON_LID_INIT_OPEN:
+4 -2
drivers/acpi/ec.c
··· 1941 1941 SET_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend, acpi_ec_resume) 1942 1942 }; 1943 1943 1944 - static int param_set_event_clearing(const char *val, struct kernel_param *kp) 1944 + static int param_set_event_clearing(const char *val, 1945 + const struct kernel_param *kp) 1945 1946 { 1946 1947 int result = 0; 1947 1948 ··· 1960 1959 return result; 1961 1960 } 1962 1961 1963 - static int param_get_event_clearing(char *buffer, struct kernel_param *kp) 1962 + static int param_get_event_clearing(char *buffer, 1963 + const struct kernel_param *kp) 1964 1964 { 1965 1965 switch (ec_event_clearing) { 1966 1966 case ACPI_EC_EVT_TIMING_STATUS:
+5 -3
drivers/acpi/sysfs.c
··· 231 231 module_param_cb(trace_debug_layer, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_layer, 0644); 232 232 module_param_cb(trace_debug_level, &param_ops_trace_attrib, &acpi_gbl_trace_dbg_level, 0644); 233 233 234 - static int param_set_trace_state(const char *val, struct kernel_param *kp) 234 + static int param_set_trace_state(const char *val, 235 + const struct kernel_param *kp) 235 236 { 236 237 acpi_status status; 237 238 const char *method = trace_method_name; ··· 268 267 return 0; 269 268 } 270 269 271 - static int param_get_trace_state(char *buffer, struct kernel_param *kp) 270 + static int param_get_trace_state(char *buffer, const struct kernel_param *kp) 272 271 { 273 272 if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED)) 274 273 return sprintf(buffer, "disable"); ··· 297 296 "To enable/disable the ACPI Debug Object output."); 298 297 299 298 /* /sys/module/acpi/parameters/acpica_version */ 300 - static int param_get_acpica_version(char *buffer, struct kernel_param *kp) 299 + static int param_get_acpica_version(char *buffer, 300 + const struct kernel_param *kp) 301 301 { 302 302 int result; 303 303
+1 -1
drivers/android/binder.c
··· 150 150 static int binder_stop_on_user_error; 151 151 152 152 static int binder_set_stop_on_user_error(const char *val, 153 - struct kernel_param *kp) 153 + const struct kernel_param *kp) 154 154 { 155 155 int ret; 156 156
+1 -1
drivers/char/ipmi/ipmi_poweroff.c
··· 66 66 /* Holds the old poweroff function so we can restore it on removal. */ 67 67 static void (*old_poweroff_func)(void); 68 68 69 - static int set_param_ifnum(const char *val, struct kernel_param *kp) 69 + static int set_param_ifnum(const char *val, const struct kernel_param *kp) 70 70 { 71 71 int rv = param_set_int(val, kp); 72 72 if (rv)
+2 -2
drivers/char/ipmi/ipmi_si_intf.c
··· 1345 1345 #define IPMI_MEM_ADDR_SPACE 1 1346 1346 static const char * const addr_space_to_str[] = { "i/o", "mem" }; 1347 1347 1348 - static int hotmod_handler(const char *val, struct kernel_param *kp); 1348 + static int hotmod_handler(const char *val, const struct kernel_param *kp); 1349 1349 1350 1350 module_param_call(hotmod, hotmod_handler, NULL, NULL, 0200); 1351 1351 MODULE_PARM_DESC(hotmod, "Add and remove interfaces. See" ··· 1811 1811 return info; 1812 1812 } 1813 1813 1814 - static int hotmod_handler(const char *val, struct kernel_param *kp) 1814 + static int hotmod_handler(const char *val, const struct kernel_param *kp) 1815 1815 { 1816 1816 char *str = kstrdup(val, GFP_KERNEL); 1817 1817 int rv;
+1 -1
drivers/edac/edac_mc_sysfs.c
··· 50 50 return edac_mc_poll_msec; 51 51 } 52 52 53 - static int edac_set_poll_msec(const char *val, struct kernel_param *kp) 53 + static int edac_set_poll_msec(const char *val, const struct kernel_param *kp) 54 54 { 55 55 unsigned long l; 56 56 int ret;
+2 -1
drivers/edac/edac_module.c
··· 19 19 20 20 #ifdef CONFIG_EDAC_DEBUG 21 21 22 - static int edac_set_debug_level(const char *buf, struct kernel_param *kp) 22 + static int edac_set_debug_level(const char *buf, 23 + const struct kernel_param *kp) 23 24 { 24 25 unsigned long val; 25 26 int ret;
+2 -1
drivers/hid/hid-magicmouse.c
··· 34 34 MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel"); 35 35 36 36 static unsigned int scroll_speed = 32; 37 - static int param_set_scroll_speed(const char *val, struct kernel_param *kp) { 37 + static int param_set_scroll_speed(const char *val, 38 + const struct kernel_param *kp) { 38 39 unsigned long speed; 39 40 if (!val || kstrtoul(val, 0, &speed) || speed > 63) 40 41 return -EINVAL;
+2 -2
drivers/ide/ide.c
··· 244 244 static unsigned int ide_disks; 245 245 static struct chs_geom ide_disks_chs[MAX_HWIFS * MAX_DRIVES]; 246 246 247 - static int ide_set_disk_chs(const char *str, struct kernel_param *kp) 247 + static int ide_set_disk_chs(const char *str, const struct kernel_param *kp) 248 248 { 249 249 unsigned int a, b, c = 0, h = 0, s = 0, i, j = 1; 250 250 ··· 328 328 329 329 static unsigned int ide_ignore_cable; 330 330 331 - static int ide_set_ignore_cable(const char *s, struct kernel_param *kp) 331 + static int ide_set_ignore_cable(const char *s, const struct kernel_param *kp) 332 332 { 333 333 int i, j = 1; 334 334
+2 -2
drivers/infiniband/hw/qib/qib_iba7322.c
··· 150 150 .string = txselect_list, 151 151 .maxlen = MAX_ATTEN_LEN 152 152 }; 153 - static int setup_txselect(const char *, struct kernel_param *); 153 + static int setup_txselect(const char *, const struct kernel_param *); 154 154 module_param_call(txselect, setup_txselect, param_get_string, 155 155 &kp_txselect, S_IWUSR | S_IRUGO); 156 156 MODULE_PARM_DESC(txselect, ··· 6169 6169 } 6170 6170 6171 6171 /* handle the txselect parameter changing */ 6172 - static int setup_txselect(const char *str, struct kernel_param *kp) 6172 + static int setup_txselect(const char *str, const struct kernel_param *kp) 6173 6173 { 6174 6174 struct qib_devdata *dd; 6175 6175 unsigned long val;
+1 -1
drivers/infiniband/ulp/srpt/ib_srpt.c
··· 80 80 MODULE_PARM_DESC(srpt_srq_size, 81 81 "Shared receive queue (SRQ) size."); 82 82 83 - static int srpt_get_u64_x(char *buffer, struct kernel_param *kp) 83 + static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp) 84 84 { 85 85 return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg); 86 86 }
+1 -1
drivers/isdn/hardware/mISDN/avmfritz.c
··· 156 156 } 157 157 158 158 static int 159 - set_debug(const char *val, struct kernel_param *kp) 159 + set_debug(const char *val, const struct kernel_param *kp) 160 160 { 161 161 int ret; 162 162 struct fritzcard *card;
+1 -1
drivers/isdn/hardware/mISDN/mISDNinfineon.c
··· 244 244 } 245 245 246 246 static int 247 - set_debug(const char *val, struct kernel_param *kp) 247 + set_debug(const char *val, const struct kernel_param *kp) 248 248 { 249 249 int ret; 250 250 struct inf_hw *card;
+1 -1
drivers/isdn/hardware/mISDN/netjet.c
··· 111 111 } 112 112 113 113 static int 114 - set_debug(const char *val, struct kernel_param *kp) 114 + set_debug(const char *val, const struct kernel_param *kp) 115 115 { 116 116 int ret; 117 117 struct tiger_hw *card;
+1 -1
drivers/isdn/hardware/mISDN/speedfax.c
··· 94 94 } 95 95 96 96 static int 97 - set_debug(const char *val, struct kernel_param *kp) 97 + set_debug(const char *val, const struct kernel_param *kp) 98 98 { 99 99 int ret; 100 100 struct sfax_hw *card;
+1 -1
drivers/isdn/hardware/mISDN/w6692.c
··· 101 101 } 102 102 103 103 static int 104 - set_debug(const char *val, struct kernel_param *kp) 104 + set_debug(const char *val, const struct kernel_param *kp) 105 105 { 106 106 int ret; 107 107 struct w6692_hw *card;
+3 -3
drivers/md/md.c
··· 5375 5375 return NULL; 5376 5376 } 5377 5377 5378 - static int add_named_array(const char *val, struct kernel_param *kp) 5378 + static int add_named_array(const char *val, const struct kernel_param *kp) 5379 5379 { 5380 5380 /* 5381 5381 * val must be "md_*" or "mdNNN". ··· 9315 9315 subsys_initcall(md_init); 9316 9316 module_exit(md_exit) 9317 9317 9318 - static int get_ro(char *buffer, struct kernel_param *kp) 9318 + static int get_ro(char *buffer, const struct kernel_param *kp) 9319 9319 { 9320 9320 return sprintf(buffer, "%d", start_readonly); 9321 9321 } 9322 - static int set_ro(const char *val, struct kernel_param *kp) 9322 + static int set_ro(const char *val, const struct kernel_param *kp) 9323 9323 { 9324 9324 return kstrtouint(val, 10, (unsigned int *)&start_readonly); 9325 9325 }
+2 -2
drivers/media/pci/tw686x/tw686x-core.c
··· 72 72 } 73 73 } 74 74 75 - static int tw686x_dma_mode_get(char *buffer, struct kernel_param *kp) 75 + static int tw686x_dma_mode_get(char *buffer, const struct kernel_param *kp) 76 76 { 77 77 return sprintf(buffer, "%s", dma_mode_name(dma_mode)); 78 78 } 79 79 80 - static int tw686x_dma_mode_set(const char *val, struct kernel_param *kp) 80 + static int tw686x_dma_mode_set(const char *val, const struct kernel_param *kp) 81 81 { 82 82 if (!strcasecmp(val, dma_mode_name(TW686X_DMA_MODE_MEMCPY))) 83 83 dma_mode = TW686X_DMA_MODE_MEMCPY;
+2 -2
drivers/media/usb/uvc/uvc_driver.c
··· 2230 2230 * Module parameters 2231 2231 */ 2232 2232 2233 - static int uvc_clock_param_get(char *buffer, struct kernel_param *kp) 2233 + static int uvc_clock_param_get(char *buffer, const struct kernel_param *kp) 2234 2234 { 2235 2235 if (uvc_clock_param == CLOCK_MONOTONIC) 2236 2236 return sprintf(buffer, "CLOCK_MONOTONIC"); ··· 2238 2238 return sprintf(buffer, "CLOCK_REALTIME"); 2239 2239 } 2240 2240 2241 - static int uvc_clock_param_set(const char *val, struct kernel_param *kp) 2241 + static int uvc_clock_param_set(const char *val, const struct kernel_param *kp) 2242 2242 { 2243 2243 if (strncasecmp(val, "clock_", strlen("clock_")) == 0) 2244 2244 val += strlen("clock_");
+2 -2
drivers/message/fusion/mptbase.c
··· 99 99 MODULE_PARM_DESC(mpt_channel_mapping, " Mapping id's to channels (default=0)"); 100 100 101 101 static int mpt_debug_level; 102 - static int mpt_set_debug_level(const char *val, struct kernel_param *kp); 102 + static int mpt_set_debug_level(const char *val, const struct kernel_param *kp); 103 103 module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int, 104 104 &mpt_debug_level, 0600); 105 105 MODULE_PARM_DESC(mpt_debug_level, ··· 242 242 pci_write_config_word(pdev, PCI_COMMAND, command_reg); 243 243 } 244 244 245 - static int mpt_set_debug_level(const char *val, struct kernel_param *kp) 245 + static int mpt_set_debug_level(const char *val, const struct kernel_param *kp) 246 246 { 247 247 int ret = param_set_int(val, kp); 248 248 MPT_ADAPTER *ioc;
+2 -1
drivers/misc/kgdbts.c
··· 1132 1132 ts.run_test(0, chr); 1133 1133 } 1134 1134 1135 - static int param_set_kgdbts_var(const char *kmessage, struct kernel_param *kp) 1135 + static int param_set_kgdbts_var(const char *kmessage, 1136 + const struct kernel_param *kp) 1136 1137 { 1137 1138 int len = strlen(kmessage); 1138 1139
+1 -1
drivers/mtd/devices/block2mtd.c
··· 431 431 } 432 432 433 433 434 - static int block2mtd_setup(const char *val, struct kernel_param *kp) 434 + static int block2mtd_setup(const char *val, const struct kernel_param *kp) 435 435 { 436 436 #ifdef MODULE 437 437 return block2mtd_setup2(val);
+1 -1
drivers/mtd/devices/phram.c
··· 266 266 return ret; 267 267 } 268 268 269 - static int phram_param_call(const char *val, struct kernel_param *kp) 269 + static int phram_param_call(const char *val, const struct kernel_param *kp) 270 270 { 271 271 #ifdef MODULE 272 272 return phram_setup(val);
+1 -1
drivers/mtd/ubi/build.c
··· 1334 1334 * This function returns zero in case of success and a negative error code in 1335 1335 * case of error. 1336 1336 */ 1337 - static int ubi_mtd_param_parse(const char *val, struct kernel_param *kp) 1337 + static int ubi_mtd_param_parse(const char *val, const struct kernel_param *kp) 1338 1338 { 1339 1339 int i, len; 1340 1340 struct mtd_dev_param *p;
+3 -2
drivers/pci/pcie/aspm.c
··· 1061 1061 } 1062 1062 EXPORT_SYMBOL(pci_disable_link_state); 1063 1063 1064 - static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp) 1064 + static int pcie_aspm_set_policy(const char *val, 1065 + const struct kernel_param *kp) 1065 1066 { 1066 1067 int i; 1067 1068 struct pcie_link_state *link; ··· 1089 1088 return 0; 1090 1089 } 1091 1090 1092 - static int pcie_aspm_get_policy(char *buffer, struct kernel_param *kp) 1091 + static int pcie_aspm_get_policy(char *buffer, const struct kernel_param *kp) 1093 1092 { 1094 1093 int i, cnt = 0; 1095 1094 for (i = 0; i < ARRAY_SIZE(policy_str); i++)
+1 -1
drivers/platform/x86/thinkpad_acpi.c
··· 9543 9543 }, 9544 9544 }; 9545 9545 9546 - static int __init set_ibm_param(const char *val, struct kernel_param *kp) 9546 + static int __init set_ibm_param(const char *val, const struct kernel_param *kp) 9547 9547 { 9548 9548 unsigned int i; 9549 9549 struct ibm_struct *ibm;
+12 -8
drivers/scsi/fcoe/fcoe_transport.c
··· 32 32 MODULE_DESCRIPTION("FIP discovery protocol and FCoE transport for FCoE HBAs"); 33 33 MODULE_LICENSE("GPL v2"); 34 34 35 - static int fcoe_transport_create(const char *, struct kernel_param *); 36 - static int fcoe_transport_destroy(const char *, struct kernel_param *); 35 + static int fcoe_transport_create(const char *, const struct kernel_param *); 36 + static int fcoe_transport_destroy(const char *, const struct kernel_param *); 37 37 static int fcoe_transport_show(char *buffer, const struct kernel_param *kp); 38 38 static struct fcoe_transport *fcoe_transport_lookup(struct net_device *device); 39 39 static struct fcoe_transport *fcoe_netdev_map_lookup(struct net_device *device); 40 - static int fcoe_transport_enable(const char *, struct kernel_param *); 41 - static int fcoe_transport_disable(const char *, struct kernel_param *); 40 + static int fcoe_transport_enable(const char *, const struct kernel_param *); 41 + static int fcoe_transport_disable(const char *, const struct kernel_param *); 42 42 static int libfcoe_device_notification(struct notifier_block *notifier, 43 43 ulong event, void *ptr); 44 44 ··· 867 867 * 868 868 * Returns: 0 for success 869 869 */ 870 - static int fcoe_transport_create(const char *buffer, struct kernel_param *kp) 870 + static int fcoe_transport_create(const char *buffer, 871 + const struct kernel_param *kp) 871 872 { 872 873 int rc = -ENODEV; 873 874 struct net_device *netdev = NULL; ··· 933 932 * 934 933 * Returns: 0 for success 935 934 */ 936 - static int fcoe_transport_destroy(const char *buffer, struct kernel_param *kp) 935 + static int fcoe_transport_destroy(const char *buffer, 936 + const struct kernel_param *kp) 937 937 { 938 938 int rc = -ENODEV; 939 939 struct net_device *netdev = NULL; ··· 978 976 * 979 977 * Returns: 0 for success 980 978 */ 981 - static int fcoe_transport_disable(const char *buffer, struct kernel_param *kp) 979 + static int fcoe_transport_disable(const char *buffer, 980 + const struct kernel_param *kp) 982 981 { 983 982 int rc = -ENODEV; 984 983 struct net_device *netdev = NULL; ··· 1013 1010 * 1014 1011 * Returns: 0 for success 1015 1012 */ 1016 - static int fcoe_transport_enable(const char *buffer, struct kernel_param *kp) 1013 + static int fcoe_transport_enable(const char *buffer, 1014 + const struct kernel_param *kp) 1017 1015 { 1018 1016 int rc = -ENODEV; 1019 1017 struct net_device *netdev = NULL;
+1 -1
drivers/scsi/mpt3sas/mpt3sas_base.c
··· 106 106 * 107 107 */ 108 108 static int 109 - _scsih_set_fwfault_debug(const char *val, struct kernel_param *kp) 109 + _scsih_set_fwfault_debug(const char *val, const struct kernel_param *kp) 110 110 { 111 111 int ret = param_set_int(val, kp); 112 112 struct MPT3SAS_ADAPTER *ioc;
+1 -1
drivers/scsi/mpt3sas/mpt3sas_scsih.c
··· 288 288 * Note: The logging levels are defined in mpt3sas_debug.h. 289 289 */ 290 290 static int 291 - _scsih_set_debug_level(const char *val, struct kernel_param *kp) 291 + _scsih_set_debug_level(const char *val, const struct kernel_param *kp) 292 292 { 293 293 int ret = param_set_int(val, kp); 294 294 struct MPT3SAS_ADAPTER *ioc;
+2 -1
drivers/tty/serial/kgdboc.c
··· 242 242 kgdb_tty_line, chr); 243 243 } 244 244 245 - static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp) 245 + static int param_set_kgdboc_var(const char *kmessage, 246 + const struct kernel_param *kp) 246 247 { 247 248 int len = strlen(kmessage); 248 249
+2 -2
fs/fuse/inode.c
··· 31 31 struct list_head fuse_conn_list; 32 32 DEFINE_MUTEX(fuse_mutex); 33 33 34 - static int set_global_limit(const char *val, struct kernel_param *kp); 34 + static int set_global_limit(const char *val, const struct kernel_param *kp); 35 35 36 36 unsigned max_user_bgreq; 37 37 module_param_call(max_user_bgreq, set_global_limit, param_get_uint, ··· 823 823 *limit = (1 << 16) - 1; 824 824 } 825 825 826 - static int set_global_limit(const char *val, struct kernel_param *kp) 826 + static int set_global_limit(const char *val, const struct kernel_param *kp) 827 827 { 828 828 int rv; 829 829
+1 -1
fs/lockd/svc.c
··· 602 602 */ 603 603 604 604 #define param_set_min_max(name, type, which_strtol, min, max) \ 605 - static int param_set_##name(const char *val, struct kernel_param *kp) \ 605 + static int param_set_##name(const char *val, const struct kernel_param *kp) \ 606 606 { \ 607 607 char *endp; \ 608 608 __typeof__(type) num = which_strtol(val, &endp, 0); \
+2 -2
fs/ocfs2/dlmfs/dlmfs.c
··· 88 88 */ 89 89 #define DLMFS_CAPABILITIES "bast stackglue" 90 90 static int param_set_dlmfs_capabilities(const char *val, 91 - struct kernel_param *kp) 91 + const struct kernel_param *kp) 92 92 { 93 93 printk(KERN_ERR "%s: readonly parameter\n", kp->name); 94 94 return -EINVAL; 95 95 } 96 96 static int param_get_dlmfs_capabilities(char *buffer, 97 - struct kernel_param *kp) 97 + const struct kernel_param *kp) 98 98 { 99 99 return strlcpy(buffer, DLMFS_CAPABILITIES, 100 100 strlen(DLMFS_CAPABILITIES) + 1);
+4 -12
include/linux/moduleparam.h
··· 228 228 VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } 229 229 230 230 /* Obsolete - use module_param_cb() */ 231 - #define module_param_call(name, set, get, arg, perm) \ 232 - static const struct kernel_param_ops __param_ops_##name = \ 233 - { .flags = 0, (void *)set, (void *)get }; \ 231 + #define module_param_call(name, _set, _get, arg, perm) \ 232 + static const struct kernel_param_ops __param_ops_##name = \ 233 + { .flags = 0, .set = _set, .get = _get }; \ 234 234 __module_param_call(MODULE_PARAM_PREFIX, \ 235 - name, &__param_ops_##name, arg, \ 236 - (perm) + sizeof(__check_old_set_param(set))*0, -1, 0) 237 - 238 - /* We don't get oldget: it's often a new-style param_get_uint, etc. */ 239 - static inline int 240 - __check_old_set_param(int (*oldset)(const char *, struct kernel_param *)) 241 - { 242 - return 0; 243 - } 235 + name, &__param_ops_##name, arg, perm, -1, 0) 244 236 245 237 #ifdef CONFIG_SYSFS 246 238 extern void kernel_param_lock(struct module *mod);
+1 -1
include/net/netfilter/nf_conntrack.h
··· 285 285 286 286 struct kernel_param; 287 287 288 - int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp); 288 + int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp); 289 289 int nf_conntrack_hash_resize(unsigned int hashsize); 290 290 291 291 extern struct hlist_nulls_head *nf_conntrack_hash;
+1 -3
kernel/module.c
··· 847 847 848 848 pr_debug("Allocating new usage for %s.\n", a->name); 849 849 use = kmalloc(sizeof(*use), GFP_ATOMIC); 850 - if (!use) { 851 - pr_warn("%s: out of memory loading\n", a->name); 850 + if (!use) 852 851 return -ENOMEM; 853 - } 854 852 855 853 use->source = a; 856 854 use->target = b;
+1 -1
net/netfilter/nf_conntrack_core.c
··· 1945 1945 return 0; 1946 1946 } 1947 1947 1948 - int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp) 1948 + int nf_conntrack_set_hashsize(const char *val, const struct kernel_param *kp) 1949 1949 { 1950 1950 unsigned int hashsize; 1951 1951 int rc;
+1 -1
net/netfilter/nf_nat_ftp.c
··· 134 134 } 135 135 136 136 /* Prior to 2.6.11, we had a ports param. No longer, but don't break users. */ 137 - static int warn_set(const char *val, struct kernel_param *kp) 137 + static int warn_set(const char *val, const struct kernel_param *kp) 138 138 { 139 139 printk(KERN_INFO KBUILD_MODNAME 140 140 ": kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
+1 -1
net/netfilter/nf_nat_irc.c
··· 106 106 } 107 107 108 108 /* Prior to 2.6.11, we had a ports param. No longer, but don't break users. */ 109 - static int warn_set(const char *val, struct kernel_param *kp) 109 + static int warn_set(const char *val, const struct kernel_param *kp) 110 110 { 111 111 printk(KERN_INFO KBUILD_MODNAME 112 112 ": kernel >= 2.6.10 only uses 'ports' for conntrack modules\n");
+2 -2
net/sunrpc/svc.c
··· 50 50 static DEFINE_MUTEX(svc_pool_map_mutex);/* protects svc_pool_map.count only */ 51 51 52 52 static int 53 - param_set_pool_mode(const char *val, struct kernel_param *kp) 53 + param_set_pool_mode(const char *val, const struct kernel_param *kp) 54 54 { 55 55 int *ip = (int *)kp->arg; 56 56 struct svc_pool_map *m = &svc_pool_map; ··· 80 80 } 81 81 82 82 static int 83 - param_get_pool_mode(char *buf, struct kernel_param *kp) 83 + param_get_pool_mode(char *buf, const struct kernel_param *kp) 84 84 { 85 85 int *ip = (int *)kp->arg; 86 86
+8 -8
security/apparmor/lsm.c
··· 813 813 .get = param_get_aalockpolicy 814 814 }; 815 815 816 - static int param_set_audit(const char *val, struct kernel_param *kp); 817 - static int param_get_audit(char *buffer, struct kernel_param *kp); 816 + static int param_set_audit(const char *val, const struct kernel_param *kp); 817 + static int param_get_audit(char *buffer, const struct kernel_param *kp); 818 818 819 - static int param_set_mode(const char *val, struct kernel_param *kp); 820 - static int param_get_mode(char *buffer, struct kernel_param *kp); 819 + static int param_set_mode(const char *val, const struct kernel_param *kp); 820 + static int param_get_mode(char *buffer, const struct kernel_param *kp); 821 821 822 822 /* Flag values, also controllable via /sys/module/apparmor/parameters 823 823 * We define special types as we want to do additional mediation. ··· 951 951 return param_get_uint(buffer, kp); 952 952 } 953 953 954 - static int param_get_audit(char *buffer, struct kernel_param *kp) 954 + static int param_get_audit(char *buffer, const struct kernel_param *kp) 955 955 { 956 956 if (!apparmor_enabled) 957 957 return -EINVAL; ··· 960 960 return sprintf(buffer, "%s", audit_mode_names[aa_g_audit]); 961 961 } 962 962 963 - static int param_set_audit(const char *val, struct kernel_param *kp) 963 + static int param_set_audit(const char *val, const struct kernel_param *kp) 964 964 { 965 965 int i; 966 966 ··· 981 981 return -EINVAL; 982 982 } 983 983 984 - static int param_get_mode(char *buffer, struct kernel_param *kp) 984 + static int param_get_mode(char *buffer, const struct kernel_param *kp) 985 985 { 986 986 if (!apparmor_enabled) 987 987 return -EINVAL; ··· 991 991 return sprintf(buffer, "%s", aa_profile_mode_names[aa_g_profile_mode]); 992 992 } 993 993 994 - static int param_set_mode(const char *val, struct kernel_param *kp) 994 + static int param_set_mode(const char *val, const struct kernel_param *kp) 995 995 { 996 996 int i; 997 997