mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
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()
This commit is contained in:
@@ -742,7 +742,7 @@ static void cmm_exit(void)
|
||||
* Return value:
|
||||
* 0 on success / other on failure
|
||||
**/
|
||||
static int cmm_set_disable(const char *val, struct kernel_param *kp)
|
||||
static int cmm_set_disable(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int disable = simple_strtoul(val, NULL, 10);
|
||||
|
||||
|
||||
@@ -592,7 +592,7 @@ enum __force_cpu_type {
|
||||
|
||||
static int force_cpu_type;
|
||||
|
||||
static int set_cpu_type(const char *str, struct kernel_param *kp)
|
||||
static int set_cpu_type(const char *str, const struct kernel_param *kp)
|
||||
{
|
||||
if (!strcmp(str, "timer")) {
|
||||
force_cpu_type = timer;
|
||||
|
||||
@@ -573,7 +573,8 @@ static int acpi_button_remove(struct acpi_device *device)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int param_set_lid_init_state(const char *val, struct kernel_param *kp)
|
||||
static int param_set_lid_init_state(const char *val,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
@@ -591,7 +592,8 @@ static int param_set_lid_init_state(const char *val, struct kernel_param *kp)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int param_get_lid_init_state(char *buffer, struct kernel_param *kp)
|
||||
static int param_get_lid_init_state(char *buffer,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
switch (lid_init_state) {
|
||||
case ACPI_BUTTON_LID_INIT_OPEN:
|
||||
|
||||
@@ -1941,7 +1941,8 @@ static const struct dev_pm_ops acpi_ec_pm = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(acpi_ec_suspend, acpi_ec_resume)
|
||||
};
|
||||
|
||||
static int param_set_event_clearing(const char *val, struct kernel_param *kp)
|
||||
static int param_set_event_clearing(const char *val,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
@@ -1959,7 +1960,8 @@ static int param_set_event_clearing(const char *val, struct kernel_param *kp)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int param_get_event_clearing(char *buffer, struct kernel_param *kp)
|
||||
static int param_get_event_clearing(char *buffer,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
switch (ec_event_clearing) {
|
||||
case ACPI_EC_EVT_TIMING_STATUS:
|
||||
|
||||
@@ -231,7 +231,8 @@ module_param_cb(trace_method_name, ¶m_ops_trace_method, &trace_method_name,
|
||||
module_param_cb(trace_debug_layer, ¶m_ops_trace_attrib, &acpi_gbl_trace_dbg_layer, 0644);
|
||||
module_param_cb(trace_debug_level, ¶m_ops_trace_attrib, &acpi_gbl_trace_dbg_level, 0644);
|
||||
|
||||
static int param_set_trace_state(const char *val, struct kernel_param *kp)
|
||||
static int param_set_trace_state(const char *val,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
acpi_status status;
|
||||
const char *method = trace_method_name;
|
||||
@@ -267,7 +268,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int param_get_trace_state(char *buffer, struct kernel_param *kp)
|
||||
static int param_get_trace_state(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
if (!(acpi_gbl_trace_flags & ACPI_TRACE_ENABLED))
|
||||
return sprintf(buffer, "disable");
|
||||
@@ -296,7 +297,8 @@ MODULE_PARM_DESC(aml_debug_output,
|
||||
"To enable/disable the ACPI Debug Object output.");
|
||||
|
||||
/* /sys/module/acpi/parameters/acpica_version */
|
||||
static int param_get_acpica_version(char *buffer, struct kernel_param *kp)
|
||||
static int param_get_acpica_version(char *buffer,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
int result;
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ static DECLARE_WAIT_QUEUE_HEAD(binder_user_error_wait);
|
||||
static int binder_stop_on_user_error;
|
||||
|
||||
static int binder_set_stop_on_user_error(const char *val,
|
||||
struct kernel_param *kp)
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ static void (*specific_poweroff_func)(ipmi_user_t user);
|
||||
/* Holds the old poweroff function so we can restore it on removal. */
|
||||
static void (*old_poweroff_func)(void);
|
||||
|
||||
static int set_param_ifnum(const char *val, struct kernel_param *kp)
|
||||
static int set_param_ifnum(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int rv = param_set_int(val, kp);
|
||||
if (rv)
|
||||
|
||||
@@ -1345,7 +1345,7 @@ static unsigned int num_slave_addrs;
|
||||
#define IPMI_MEM_ADDR_SPACE 1
|
||||
static const char * const addr_space_to_str[] = { "i/o", "mem" };
|
||||
|
||||
static int hotmod_handler(const char *val, struct kernel_param *kp);
|
||||
static int hotmod_handler(const char *val, const struct kernel_param *kp);
|
||||
|
||||
module_param_call(hotmod, hotmod_handler, NULL, NULL, 0200);
|
||||
MODULE_PARM_DESC(hotmod, "Add and remove interfaces. See"
|
||||
@@ -1811,7 +1811,7 @@ static struct smi_info *smi_info_alloc(void)
|
||||
return info;
|
||||
}
|
||||
|
||||
static int hotmod_handler(const char *val, struct kernel_param *kp)
|
||||
static int hotmod_handler(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
char *str = kstrdup(val, GFP_KERNEL);
|
||||
int rv;
|
||||
|
||||
@@ -50,7 +50,7 @@ int edac_mc_get_poll_msec(void)
|
||||
return edac_mc_poll_msec;
|
||||
}
|
||||
|
||||
static int edac_set_poll_msec(const char *val, struct kernel_param *kp)
|
||||
static int edac_set_poll_msec(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
unsigned long l;
|
||||
int ret;
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
|
||||
#ifdef CONFIG_EDAC_DEBUG
|
||||
|
||||
static int edac_set_debug_level(const char *buf, struct kernel_param *kp)
|
||||
static int edac_set_debug_level(const char *buf,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
unsigned long val;
|
||||
int ret;
|
||||
|
||||
@@ -34,7 +34,8 @@ module_param(emulate_scroll_wheel, bool, 0644);
|
||||
MODULE_PARM_DESC(emulate_scroll_wheel, "Emulate a scroll wheel");
|
||||
|
||||
static unsigned int scroll_speed = 32;
|
||||
static int param_set_scroll_speed(const char *val, struct kernel_param *kp) {
|
||||
static int param_set_scroll_speed(const char *val,
|
||||
const struct kernel_param *kp) {
|
||||
unsigned long speed;
|
||||
if (!val || kstrtoul(val, 0, &speed) || speed > 63)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -244,7 +244,7 @@ struct chs_geom {
|
||||
static unsigned int ide_disks;
|
||||
static struct chs_geom ide_disks_chs[MAX_HWIFS * MAX_DRIVES];
|
||||
|
||||
static int ide_set_disk_chs(const char *str, struct kernel_param *kp)
|
||||
static int ide_set_disk_chs(const char *str, const struct kernel_param *kp)
|
||||
{
|
||||
unsigned int a, b, c = 0, h = 0, s = 0, i, j = 1;
|
||||
|
||||
@@ -328,7 +328,7 @@ static void ide_dev_apply_params(ide_drive_t *drive, u8 unit)
|
||||
|
||||
static unsigned int ide_ignore_cable;
|
||||
|
||||
static int ide_set_ignore_cable(const char *s, struct kernel_param *kp)
|
||||
static int ide_set_ignore_cable(const char *s, const struct kernel_param *kp)
|
||||
{
|
||||
int i, j = 1;
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ static struct kparam_string kp_txselect = {
|
||||
.string = txselect_list,
|
||||
.maxlen = MAX_ATTEN_LEN
|
||||
};
|
||||
static int setup_txselect(const char *, struct kernel_param *);
|
||||
static int setup_txselect(const char *, const struct kernel_param *);
|
||||
module_param_call(txselect, setup_txselect, param_get_string,
|
||||
&kp_txselect, S_IWUSR | S_IRUGO);
|
||||
MODULE_PARM_DESC(txselect,
|
||||
@@ -6169,7 +6169,7 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
|
||||
}
|
||||
|
||||
/* handle the txselect parameter changing */
|
||||
static int setup_txselect(const char *str, struct kernel_param *kp)
|
||||
static int setup_txselect(const char *str, const struct kernel_param *kp)
|
||||
{
|
||||
struct qib_devdata *dd;
|
||||
unsigned long val;
|
||||
|
||||
@@ -80,7 +80,7 @@ module_param(srpt_srq_size, int, 0444);
|
||||
MODULE_PARM_DESC(srpt_srq_size,
|
||||
"Shared receive queue (SRQ) size.");
|
||||
|
||||
static int srpt_get_u64_x(char *buffer, struct kernel_param *kp)
|
||||
static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ _set_debug(struct fritzcard *card)
|
||||
}
|
||||
|
||||
static int
|
||||
set_debug(const char *val, struct kernel_param *kp)
|
||||
set_debug(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int ret;
|
||||
struct fritzcard *card;
|
||||
|
||||
@@ -244,7 +244,7 @@ _set_debug(struct inf_hw *card)
|
||||
}
|
||||
|
||||
static int
|
||||
set_debug(const char *val, struct kernel_param *kp)
|
||||
set_debug(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int ret;
|
||||
struct inf_hw *card;
|
||||
|
||||
@@ -111,7 +111,7 @@ _set_debug(struct tiger_hw *card)
|
||||
}
|
||||
|
||||
static int
|
||||
set_debug(const char *val, struct kernel_param *kp)
|
||||
set_debug(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int ret;
|
||||
struct tiger_hw *card;
|
||||
|
||||
@@ -94,7 +94,7 @@ _set_debug(struct sfax_hw *card)
|
||||
}
|
||||
|
||||
static int
|
||||
set_debug(const char *val, struct kernel_param *kp)
|
||||
set_debug(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int ret;
|
||||
struct sfax_hw *card;
|
||||
|
||||
@@ -101,7 +101,7 @@ _set_debug(struct w6692_hw *card)
|
||||
}
|
||||
|
||||
static int
|
||||
set_debug(const char *val, struct kernel_param *kp)
|
||||
set_debug(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
int ret;
|
||||
struct w6692_hw *card;
|
||||
|
||||
@@ -5375,7 +5375,7 @@ static struct kobject *md_probe(dev_t dev, int *part, void *data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int add_named_array(const char *val, struct kernel_param *kp)
|
||||
static int add_named_array(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
/*
|
||||
* val must be "md_*" or "mdNNN".
|
||||
@@ -9315,11 +9315,11 @@ static __exit void md_exit(void)
|
||||
subsys_initcall(md_init);
|
||||
module_exit(md_exit)
|
||||
|
||||
static int get_ro(char *buffer, struct kernel_param *kp)
|
||||
static int get_ro(char *buffer, const struct kernel_param *kp)
|
||||
{
|
||||
return sprintf(buffer, "%d", start_readonly);
|
||||
}
|
||||
static int set_ro(const char *val, struct kernel_param *kp)
|
||||
static int set_ro(const char *val, const struct kernel_param *kp)
|
||||
{
|
||||
return kstrtouint(val, 10, (unsigned int *)&start_readonly);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user