Skip to content

Commit

Permalink
sysctl: Drop & in front of every proc_handler.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Eric W. Biederman <[email protected]>
  • Loading branch information
ebiederm committed Nov 18, 2009
1 parent 86926d0 commit 6d45611
Show file tree
Hide file tree
Showing 45 changed files with 339 additions and 339 deletions.
6 changes: 3 additions & 3 deletions arch/arm/kernel/isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}, {}
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-bcmring/arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
{}
};

Expand Down
8 changes: 4 additions & 4 deletions arch/frv/kernel/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{ }
};
Expand Down
4 changes: 2 additions & 2 deletions arch/frv/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ 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
{
.procname = "pin-cxnr",
.data = NULL,
.maxlen = 0,
.mode = 0644,
.proc_handler = &procctl_frv_pin_cxnr
.proc_handler = procctl_frv_pin_cxnr
},
#endif
{}
Expand Down
4 changes: 2 additions & 2 deletions arch/ia64/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{ }
};
Expand Down
8 changes: 4 additions & 4 deletions arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{}
};
Expand Down
22 changes: 11 additions & 11 deletions arch/mips/lasat/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,43 +182,43 @@ 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
{
.procname = "ipaddr",
.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
{
Expand All @@ -227,37 +227,37 @@ 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
{
.procname = "rtc",
.data = &rtctmp,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dolasatrtc,
.proc_handler = proc_dolasatrtc,
},
#endif
{
.procname = "namestr",
.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,
},
{}
};
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{}
};
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/appldata/appldata_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{ },
};
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/kernel/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{ }
};
Expand Down
6 changes: 3 additions & 3 deletions arch/s390/mm/cmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{ }
};
Expand Down
6 changes: 3 additions & 3 deletions arch/sh/kernel/traps_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
{}
};

Expand Down
2 changes: 1 addition & 1 deletion crypto/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{}
};
Expand Down
12 changes: 6 additions & 6 deletions drivers/cdrom/cdrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
{ }
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{}
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
{ }
};

Expand Down
Loading

0 comments on commit 6d45611

Please sign in to comment.