Commit 6d456111 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

sysctl: Drop & in front of every proc_handler.



For consistency drop & in front of every proc_handler.  Explicity
taking the address is unnecessary and it prevents optimizations
like stubbing the proc_handlers to NULL.

Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
parent 86926d00
......@@ -26,19 +26,19 @@ static ctl_table ctl_isa_vars[4] = {
.data = &isa_membase,
.maxlen = sizeof(isa_membase),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
}, {
.procname = "portbase",
.data = &isa_portbase,
.maxlen = sizeof(isa_portbase),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
}, {
.procname = "portshift",
.data = &isa_portshift,
.maxlen = sizeof(isa_portshift),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
}, {}
};
......
......@@ -58,7 +58,7 @@ static struct ctl_table bcmring_sysctl_warm_reboot[] = {
.data = &bcmring_arch_warm_reboot,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec},
.proc_handler = proc_dointvec},
{}
};
......
......@@ -303,28 +303,28 @@ static struct ctl_table pm_table[] =
.data = NULL,
.maxlen = 0,
.mode = 0200,
.proc_handler = &sysctl_pm_do_suspend,
.proc_handler = sysctl_pm_do_suspend,
},
{
.procname = "cmode",
.data = &clock_cmode_current,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cmode_procctl,
.proc_handler = cmode_procctl,
},
{
.procname = "p0",
.data = &clock_p0_current,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &p0_procctl,
.proc_handler = p0_procctl,
},
{
.procname = "cm",
.data = &clock_cm_current,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cm_procctl,
.proc_handler = cm_procctl,
},
{ }
};
......
......@@ -180,7 +180,7 @@ static struct ctl_table frv_table[] =
.data = NULL,
.maxlen = 0,
.mode = 0644,
.proc_handler = &procctl_frv_cachemode,
.proc_handler = procctl_frv_cachemode,
},
#ifdef CONFIG_MMU
{
......@@ -188,7 +188,7 @@ static struct ctl_table frv_table[] =
.data = NULL,
.maxlen = 0,
.mode = 0644,
.proc_handler = &procctl_frv_pin_cxnr
.proc_handler = procctl_frv_pin_cxnr
},
#endif
{}
......
......@@ -243,14 +243,14 @@ static ctl_table kdump_ctl_table[] = {
.data = &kdump_on_init,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "kdump_on_fatal_mca",
.data = &kdump_on_fatal_mca,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{ }
};
......
......@@ -526,28 +526,28 @@ static ctl_table pfm_ctl_table[]={
.data = &pfm_sysctl.debug,
.maxlen = sizeof(int),
.mode = 0666,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "debug_ovfl",
.data = &pfm_sysctl.debug_ovfl,
.maxlen = sizeof(int),
.mode = 0666,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "fastctxsw",
.data = &pfm_sysctl.fastctxsw,
.maxlen = sizeof(int),
.mode = 0600,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "expert_mode",
.data = &pfm_sysctl.expert_mode,
.maxlen = sizeof(int),
.mode = 0600,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{}
};
......
......@@ -182,28 +182,28 @@ static ctl_table lasat_table[] = {
.data = &lasat_board_info.li_cpu_hz,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "bus-hz",
.data = &lasat_board_info.li_bus_hz,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "bmid",
.data = &lasat_board_info.li_bmid,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "prid",
.data = &lasat_board_info.li_prid,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_lasat_prid,
.proc_handler = proc_lasat_prid,
. },
#ifdef CONFIG_INET
{
......@@ -211,14 +211,14 @@ static ctl_table lasat_table[] = {
.data = &lasat_board_info.li_eeprom_info.ipaddr,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_lasat_ip,
.proc_handler = proc_lasat_ip,
},
{
.procname = "netmask",
.data = &lasat_board_info.li_eeprom_info.netmask,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_lasat_ip,
.proc_handler = proc_lasat_ip,
},
#endif
{
......@@ -227,14 +227,14 @@ static ctl_table lasat_table[] = {
.maxlen =
sizeof(lasat_board_info.li_eeprom_info.passwd_hash),
.mode = 0600,
.proc_handler = &proc_dolasatstring,
.proc_handler = proc_dolasatstring,
},
{
.procname = "boot-service",
.data = &lasat_boot_to_service,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
#ifdef CONFIG_DS1603
{
......@@ -242,7 +242,7 @@ static ctl_table lasat_table[] = {
.data = &rtctmp,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dolasatrtc,
.proc_handler = proc_dolasatrtc,
},
#endif
{
......@@ -250,14 +250,14 @@ static ctl_table lasat_table[] = {
.data = &lasat_board_info.li_namestr,
.maxlen = sizeof(lasat_board_info.li_namestr),
.mode = 0444,
.proc_handler = &proc_dostring,
.proc_handler = proc_dostring,
},
{
.procname = "typestr",
.data = &lasat_board_info.li_typestr,
.maxlen = sizeof(lasat_board_info.li_typestr),
.mode = 0444,
.proc_handler = &proc_dostring,
.proc_handler = proc_dostring,
},
{}
};
......
......@@ -114,7 +114,7 @@ static ctl_table powersave_nap_ctl_table[]={
.data = &powersave_nap,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{}
};
......
......@@ -61,12 +61,12 @@ static struct ctl_table appldata_table[] = {
{
.procname = "timer",
.mode = S_IRUGO | S_IWUSR,
.proc_handler = &appldata_timer_handler,
.proc_handler = appldata_timer_handler,
},
{
.procname = "interval",
.mode = S_IRUGO | S_IWUSR,
.proc_handler = &appldata_interval_handler,
.proc_handler = appldata_interval_handler,
},
{ },
};
......
......@@ -897,14 +897,14 @@ static struct ctl_table s390dbf_table[] = {
.data = &debug_stoppable,
.maxlen = sizeof(int),
.mode = S_IRUGO | S_IWUSR,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "debug_active",
.data = &debug_active,
.maxlen = sizeof(int),
.mode = S_IRUGO | S_IWUSR,
.proc_handler = &s390dbf_procactive,
.proc_handler = s390dbf_procactive,
},
{ }
};
......
......@@ -343,17 +343,17 @@ static struct ctl_table cmm_table[] = {
{
.procname = "cmm_pages",
.mode = 0644,
.proc_handler = &cmm_pages_handler,
.proc_handler = cmm_pages_handler,
},
{
.procname = "cmm_timed_pages",
.mode = 0644,
.proc_handler = &cmm_pages_handler,
.proc_handler = cmm_pages_handler,
},
{
.procname = "cmm_timeout",
.mode = 0644,
.proc_handler = &cmm_timeout_handler,
.proc_handler = cmm_timeout_handler,
},
{ }
};
......
......@@ -881,21 +881,21 @@ static ctl_table unaligned_table[] = {
.data = &kernel_mode_unaligned_fixup_count,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
.proc_handler = proc_dointvec
},
{
.procname = "user_reports",
.data = &user_mode_unaligned_fixup_count,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
.proc_handler = proc_dointvec
},
{
.procname = "user_enable",
.data = &user_mode_unaligned_fixup_enable,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec},
.proc_handler = proc_dointvec},
{}
};
......
......@@ -29,7 +29,7 @@ static struct ctl_table crypto_sysctl_table[] = {
.data = &fips_enabled,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec
.proc_handler = proc_dointvec
},
{}
};
......
......@@ -3557,42 +3557,42 @@ static ctl_table cdrom_table[] = {
.data = &cdrom_sysctl_settings.info,
.maxlen = CDROM_STR_SIZE,
.mode = 0444,
.proc_handler = &cdrom_sysctl_info,
.proc_handler = cdrom_sysctl_info,
},
{
.procname = "autoclose",
.data = &cdrom_sysctl_settings.autoclose,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cdrom_sysctl_handler,
.proc_handler = cdrom_sysctl_handler,
},
{
.procname = "autoeject",
.data = &cdrom_sysctl_settings.autoeject,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cdrom_sysctl_handler,
.proc_handler = cdrom_sysctl_handler,
},
{
.procname = "debug",
.data = &cdrom_sysctl_settings.debug,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cdrom_sysctl_handler,
.proc_handler = cdrom_sysctl_handler,
},
{
.procname = "lock",
.data = &cdrom_sysctl_settings.lock,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cdrom_sysctl_handler,
.proc_handler = cdrom_sysctl_handler,
},
{
.procname = "check_media",
.data = &cdrom_sysctl_settings.check,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &cdrom_sysctl_handler
.proc_handler = cdrom_sysctl_handler
},
{ }
};
......
......@@ -679,7 +679,7 @@ static ctl_table hpet_table[] = {
.data = &hpet_max_freq,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{}
};
......
......@@ -664,7 +664,7 @@ static ctl_table ipmi_table[] = {
.data = &poweroff_powercycle,
.maxlen = sizeof(poweroff_powercycle),
.mode = 0644,
.proc_handler = &proc_dointvec },
.proc_handler = proc_dointvec },
{ }
};
......
......@@ -435,7 +435,7 @@ static struct ctl_table pty_table[] = {
.maxlen = sizeof(int),
.mode = 0644,
.data = &pty_limit,
.proc_handler = &proc_dointvec_minmax,
.proc_handler = proc_dointvec_minmax,
.extra1 = &pty_limit_min,
.extra2 = &pty_limit_max,
}, {
......@@ -443,7 +443,7 @@ static struct ctl_table pty_table[] = {
.maxlen = sizeof(int),
.mode = 0444,
.data = &pty_count,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{}
};
......
......@@ -1264,13 +1264,13 @@ ctl_table random_table[] = {
.data = &sysctl_poolsize,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "entropy_avail",
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
.data = &input_pool.entropy_count,
},
{
......@@ -1278,7 +1278,7 @@ ctl_table random_table[] = {
.data = &random_read_wakeup_thresh,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.proc_handler = proc_dointvec_minmax,
.extra1 = &min_read_thresh,
.extra2 = &max_read_thresh,
},
......@@ -1287,7 +1287,7 @@ ctl_table random_table[] = {
.data = &random_write_wakeup_thresh,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.proc_handler = proc_dointvec_minmax,
.extra1 = &min_write_thresh,
.extra2 = &max_write_thresh,
},
......@@ -1296,13 +1296,13 @@ ctl_table random_table[] = {
.data = &sysctl_bootid,
.maxlen = 16,
.mode = 0444,
.proc_handler = &proc_do_uuid,
.proc_handler = proc_do_uuid,
},
{
.procname = "uuid",
.maxlen = 16,
.mode = 0444,
.proc_handler = &proc_do_uuid,
.proc_handler = proc_do_uuid,
},
{ }
};
......
......@@ -286,7 +286,7 @@ static ctl_table rtc_table[] = {
.data = &rtc_max_user_freq,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{ }
};
......
......@@ -31,21 +31,21 @@ static ctl_table mac_hid_files[] = {
.data = &mouse_emulate_buttons,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "mouse_button2_keycode",
.data = &mouse_button2_keycode,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{
.procname = "mouse_button3_keycode",
.data = &mouse_button3_keycode,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec,
.proc_handler = proc_dointvec,
},
{ }
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment