Commit 7fb3d1c5 authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman

staging/lustre: remove INIT_CTL_NAME

legacy code used to support kernel where struct ctl_table
has ctl_name member.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarPeng Tao <bergwolf@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f773620
...@@ -206,7 +206,6 @@ extern int lwt_snapshot (cfs_cycles_t *now, int *ncpu, int *total_size, ...@@ -206,7 +206,6 @@ extern int lwt_snapshot (cfs_cycles_t *now, int *ncpu, int *total_size,
/* compat macroses */ /* compat macroses */
#define INIT_CTL_NAME(a)
#define INIT_STRATEGY(a) #define INIT_STRATEGY(a)
#endif #endif
...@@ -855,55 +855,46 @@ static ctl_table_t lnet_table[] = { ...@@ -855,55 +855,46 @@ static ctl_table_t lnet_table[] = {
* to go via /proc for portability. * to go via /proc for portability.
*/ */
{ {
INIT_CTL_NAME(PSDEV_LNET_STATS)
.procname = "stats", .procname = "stats",
.mode = 0644, .mode = 0644,
.proc_handler = &proc_lnet_stats, .proc_handler = &proc_lnet_stats,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_ROUTES)
.procname = "routes", .procname = "routes",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_routes, .proc_handler = &proc_lnet_routes,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_ROUTERS)
.procname = "routers", .procname = "routers",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_routers, .proc_handler = &proc_lnet_routers,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_PEERS)
.procname = "peers", .procname = "peers",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_peers, .proc_handler = &proc_lnet_peers,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_PEERS)
.procname = "buffers", .procname = "buffers",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_buffers, .proc_handler = &proc_lnet_buffers,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_NIS)
.procname = "nis", .procname = "nis",
.mode = 0444, .mode = 0444,
.proc_handler = &proc_lnet_nis, .proc_handler = &proc_lnet_nis,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_PTL_ROTOR)
.procname = "portal_rotor", .procname = "portal_rotor",
.mode = 0644, .mode = 0644,
.proc_handler = &proc_lnet_portal_rotor, .proc_handler = &proc_lnet_portal_rotor,
}, },
{ {
INIT_CTL_NAME(0)
} }
}; };
static ctl_table_t top_table[] = { static ctl_table_t top_table[] = {
{ {
INIT_CTL_NAME(CTL_LNET)
.procname = "lnet", .procname = "lnet",
.mode = 0555, .mode = 0555,
.data = NULL, .data = NULL,
...@@ -911,7 +902,6 @@ static ctl_table_t top_table[] = { ...@@ -911,7 +902,6 @@ static ctl_table_t top_table[] = {
.child = lnet_table, .child = lnet_table,
}, },
{ {
INIT_CTL_NAME(0)
} }
}; };
......
...@@ -371,7 +371,6 @@ static ctl_table_t lnet_table[] = { ...@@ -371,7 +371,6 @@ static ctl_table_t lnet_table[] = {
* to go via /proc for portability. * to go via /proc for portability.
*/ */
{ {
INIT_CTL_NAME(PSDEV_DEBUG)
.procname = "debug", .procname = "debug",
.data = &libcfs_debug, .data = &libcfs_debug,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -379,7 +378,6 @@ static ctl_table_t lnet_table[] = { ...@@ -379,7 +378,6 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_dobitmasks, .proc_handler = &proc_dobitmasks,
}, },
{ {
INIT_CTL_NAME(PSDEV_SUBSYSTEM_DEBUG)
.procname = "subsystem_debug", .procname = "subsystem_debug",
.data = &libcfs_subsystem_debug, .data = &libcfs_subsystem_debug,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -387,7 +385,6 @@ static ctl_table_t lnet_table[] = { ...@@ -387,7 +385,6 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_dobitmasks, .proc_handler = &proc_dobitmasks,
}, },
{ {
INIT_CTL_NAME(PSDEV_PRINTK)
.procname = "printk", .procname = "printk",
.data = &libcfs_printk, .data = &libcfs_printk,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -395,7 +392,6 @@ static ctl_table_t lnet_table[] = { ...@@ -395,7 +392,6 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_dobitmasks, .proc_handler = &proc_dobitmasks,
}, },
{ {
INIT_CTL_NAME(PSDEV_CONSOLE_RATELIMIT)
.procname = "console_ratelimit", .procname = "console_ratelimit",
.data = &libcfs_console_ratelimit, .data = &libcfs_console_ratelimit,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -403,21 +399,18 @@ static ctl_table_t lnet_table[] = { ...@@ -403,21 +399,18 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_dointvec .proc_handler = &proc_dointvec
}, },
{ {
INIT_CTL_NAME(PSDEV_CONSOLE_MAX_DELAY_CS)
.procname = "console_max_delay_centisecs", .procname = "console_max_delay_centisecs",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = &proc_console_max_delay_cs .proc_handler = &proc_console_max_delay_cs
}, },
{ {
INIT_CTL_NAME(PSDEV_CONSOLE_MIN_DELAY_CS)
.procname = "console_min_delay_centisecs", .procname = "console_min_delay_centisecs",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = &proc_console_min_delay_cs .proc_handler = &proc_console_min_delay_cs
}, },
{ {
INIT_CTL_NAME(PSDEV_CONSOLE_BACKOFF)
.procname = "console_backoff", .procname = "console_backoff",
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
...@@ -425,7 +418,6 @@ static ctl_table_t lnet_table[] = { ...@@ -425,7 +418,6 @@ static ctl_table_t lnet_table[] = {
}, },
{ {
INIT_CTL_NAME(PSDEV_DEBUG_PATH)
.procname = "debug_path", .procname = "debug_path",
.data = libcfs_debug_file_path_arr, .data = libcfs_debug_file_path_arr,
.maxlen = sizeof(libcfs_debug_file_path_arr), .maxlen = sizeof(libcfs_debug_file_path_arr),
...@@ -434,7 +426,6 @@ static ctl_table_t lnet_table[] = { ...@@ -434,7 +426,6 @@ static ctl_table_t lnet_table[] = {
}, },
{ {
INIT_CTL_NAME(PSDEV_CPT_TABLE)
.procname = "cpu_partition_table", .procname = "cpu_partition_table",
.maxlen = 128, .maxlen = 128,
.mode = 0444, .mode = 0444,
...@@ -442,7 +433,6 @@ static ctl_table_t lnet_table[] = { ...@@ -442,7 +433,6 @@ static ctl_table_t lnet_table[] = {
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_UPCALL)
.procname = "upcall", .procname = "upcall",
.data = lnet_upcall, .data = lnet_upcall,
.maxlen = sizeof(lnet_upcall), .maxlen = sizeof(lnet_upcall),
...@@ -450,7 +440,6 @@ static ctl_table_t lnet_table[] = { ...@@ -450,7 +440,6 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_dostring, .proc_handler = &proc_dostring,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_DEBUG_LOG_UPCALL)
.procname = "debug_log_upcall", .procname = "debug_log_upcall",
.data = lnet_debug_log_upcall, .data = lnet_debug_log_upcall,
.maxlen = sizeof(lnet_debug_log_upcall), .maxlen = sizeof(lnet_debug_log_upcall),
...@@ -458,7 +447,6 @@ static ctl_table_t lnet_table[] = { ...@@ -458,7 +447,6 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_dostring, .proc_handler = &proc_dostring,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_MEMUSED)
.procname = "lnet_memused", .procname = "lnet_memused",
.data = (int *)&libcfs_kmemory.counter, .data = (int *)&libcfs_kmemory.counter,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -467,7 +455,6 @@ static ctl_table_t lnet_table[] = { ...@@ -467,7 +455,6 @@ static ctl_table_t lnet_table[] = {
INIT_STRATEGY(&sysctl_intvec) INIT_STRATEGY(&sysctl_intvec)
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_CATASTROPHE)
.procname = "catastrophe", .procname = "catastrophe",
.data = &libcfs_catastrophe, .data = &libcfs_catastrophe,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -476,7 +463,6 @@ static ctl_table_t lnet_table[] = { ...@@ -476,7 +463,6 @@ static ctl_table_t lnet_table[] = {
INIT_STRATEGY(&sysctl_intvec) INIT_STRATEGY(&sysctl_intvec)
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_PANIC_ON_LBUG)
.procname = "panic_on_lbug", .procname = "panic_on_lbug",
.data = &libcfs_panic_on_lbug, .data = &libcfs_panic_on_lbug,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -485,27 +471,23 @@ static ctl_table_t lnet_table[] = { ...@@ -485,27 +471,23 @@ static ctl_table_t lnet_table[] = {
INIT_STRATEGY(&sysctl_intvec) INIT_STRATEGY(&sysctl_intvec)
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_DUMP_KERNEL)
.procname = "dump_kernel", .procname = "dump_kernel",
.maxlen = 256, .maxlen = 256,
.mode = 0200, .mode = 0200,
.proc_handler = &proc_dump_kernel, .proc_handler = &proc_dump_kernel,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_DAEMON_FILE)
.procname = "daemon_file", .procname = "daemon_file",
.mode = 0644, .mode = 0644,
.maxlen = 256, .maxlen = 256,
.proc_handler = &proc_daemon_file, .proc_handler = &proc_daemon_file,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_DEBUG_MB)
.procname = "debug_mb", .procname = "debug_mb",
.mode = 0644, .mode = 0644,
.proc_handler = &proc_debug_mb, .proc_handler = &proc_debug_mb,
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_WATCHDOG_RATELIMIT)
.procname = "watchdog_ratelimit", .procname = "watchdog_ratelimit",
.data = &libcfs_watchdog_ratelimit, .data = &libcfs_watchdog_ratelimit,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -514,7 +496,7 @@ static ctl_table_t lnet_table[] = { ...@@ -514,7 +496,7 @@ static ctl_table_t lnet_table[] = {
.extra1 = &min_watchdog_ratelimit, .extra1 = &min_watchdog_ratelimit,
.extra2 = &max_watchdog_ratelimit, .extra2 = &max_watchdog_ratelimit,
}, },
{ INIT_CTL_NAME(PSDEV_LNET_FORCE_LBUG) {
.procname = "force_lbug", .procname = "force_lbug",
.data = NULL, .data = NULL,
.maxlen = 0, .maxlen = 0,
...@@ -522,7 +504,6 @@ static ctl_table_t lnet_table[] = { ...@@ -522,7 +504,6 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &libcfs_force_lbug .proc_handler = &libcfs_force_lbug
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_FAIL_LOC)
.procname = "fail_loc", .procname = "fail_loc",
.data = &cfs_fail_loc, .data = &cfs_fail_loc,
.maxlen = sizeof(cfs_fail_loc), .maxlen = sizeof(cfs_fail_loc),
...@@ -530,7 +511,6 @@ static ctl_table_t lnet_table[] = { ...@@ -530,7 +511,6 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_fail_loc .proc_handler = &proc_fail_loc
}, },
{ {
INIT_CTL_NAME(PSDEV_LNET_FAIL_VAL)
.procname = "fail_val", .procname = "fail_val",
.data = &cfs_fail_val, .data = &cfs_fail_val,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -538,14 +518,12 @@ static ctl_table_t lnet_table[] = { ...@@ -538,14 +518,12 @@ static ctl_table_t lnet_table[] = {
.proc_handler = &proc_dointvec .proc_handler = &proc_dointvec
}, },
{ {
INIT_CTL_NAME(0)
} }
}; };
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static ctl_table_t top_table[] = { static ctl_table_t top_table[] = {
{ {
INIT_CTL_NAME(CTL_LNET)
.procname = "lnet", .procname = "lnet",
.mode = 0555, .mode = 0555,
.data = NULL, .data = NULL,
...@@ -553,7 +531,6 @@ static ctl_table_t top_table[] = { ...@@ -553,7 +531,6 @@ static ctl_table_t top_table[] = {
.child = lnet_table, .child = lnet_table,
}, },
{ {
INIT_CTL_NAME(0)
} }
}; };
#endif #endif
......
...@@ -282,7 +282,6 @@ int LL_PROC_PROTO(proc_at_history) ...@@ -282,7 +282,6 @@ int LL_PROC_PROTO(proc_at_history)
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static ctl_table_t obd_table[] = { static ctl_table_t obd_table[] = {
{ {
INIT_CTL_NAME(OBD_TIMEOUT)
.procname = "timeout", .procname = "timeout",
.data = &obd_timeout, .data = &obd_timeout,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -290,7 +289,6 @@ static ctl_table_t obd_table[] = { ...@@ -290,7 +289,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_set_timeout .proc_handler = &proc_set_timeout
}, },
{ {
INIT_CTL_NAME(OBD_DEBUG_PEER_ON_TIMEOUT)
.procname = "debug_peer_on_timeout", .procname = "debug_peer_on_timeout",
.data = &obd_debug_peer_on_timeout, .data = &obd_debug_peer_on_timeout,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -298,7 +296,6 @@ static ctl_table_t obd_table[] = { ...@@ -298,7 +296,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_dointvec .proc_handler = &proc_dointvec
}, },
{ {
INIT_CTL_NAME(OBD_DUMP_ON_TIMEOUT)
.procname = "dump_on_timeout", .procname = "dump_on_timeout",
.data = &obd_dump_on_timeout, .data = &obd_dump_on_timeout,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -306,7 +303,6 @@ static ctl_table_t obd_table[] = { ...@@ -306,7 +303,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_dointvec .proc_handler = &proc_dointvec
}, },
{ {
INIT_CTL_NAME(OBD_DUMP_ON_EVICTION)
.procname = "dump_on_eviction", .procname = "dump_on_eviction",
.data = &obd_dump_on_eviction, .data = &obd_dump_on_eviction,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -314,7 +310,6 @@ static ctl_table_t obd_table[] = { ...@@ -314,7 +310,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_dointvec .proc_handler = &proc_dointvec
}, },
{ {
INIT_CTL_NAME(OBD_MEMUSED)
.procname = "memused", .procname = "memused",
.data = NULL, .data = NULL,
.maxlen = 0, .maxlen = 0,
...@@ -322,7 +317,6 @@ static ctl_table_t obd_table[] = { ...@@ -322,7 +317,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_memory_alloc .proc_handler = &proc_memory_alloc
}, },
{ {
INIT_CTL_NAME(OBD_PAGESUSED)
.procname = "pagesused", .procname = "pagesused",
.data = NULL, .data = NULL,
.maxlen = 0, .maxlen = 0,
...@@ -330,7 +324,6 @@ static ctl_table_t obd_table[] = { ...@@ -330,7 +324,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_pages_alloc .proc_handler = &proc_pages_alloc
}, },
{ {
INIT_CTL_NAME(OBD_MAXMEMUSED)
.procname = "memused_max", .procname = "memused_max",
.data = NULL, .data = NULL,
.maxlen = 0, .maxlen = 0,
...@@ -338,7 +331,6 @@ static ctl_table_t obd_table[] = { ...@@ -338,7 +331,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_mem_max .proc_handler = &proc_mem_max
}, },
{ {
INIT_CTL_NAME(OBD_MAXPAGESUSED)
.procname = "pagesused_max", .procname = "pagesused_max",
.data = NULL, .data = NULL,
.maxlen = 0, .maxlen = 0,
...@@ -346,7 +338,6 @@ static ctl_table_t obd_table[] = { ...@@ -346,7 +338,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_pages_max .proc_handler = &proc_pages_max
}, },
{ {
INIT_CTL_NAME(OBD_LDLM_TIMEOUT)
.procname = "ldlm_timeout", .procname = "ldlm_timeout",
.data = &ldlm_timeout, .data = &ldlm_timeout,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -354,7 +345,6 @@ static ctl_table_t obd_table[] = { ...@@ -354,7 +345,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_set_timeout .proc_handler = &proc_set_timeout
}, },
{ {
INIT_CTL_NAME(OBD_ALLOC_FAIL_RATE)
.procname = "alloc_fail_rate", .procname = "alloc_fail_rate",
.data = &obd_alloc_fail_rate, .data = &obd_alloc_fail_rate,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -362,7 +352,6 @@ static ctl_table_t obd_table[] = { ...@@ -362,7 +352,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_alloc_fail_rate .proc_handler = &proc_alloc_fail_rate
}, },
{ {
INIT_CTL_NAME(OBD_MAX_DIRTY_PAGES)
.procname = "max_dirty_mb", .procname = "max_dirty_mb",
.data = &obd_max_dirty_pages, .data = &obd_max_dirty_pages,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -370,7 +359,6 @@ static ctl_table_t obd_table[] = { ...@@ -370,7 +359,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_max_dirty_pages_in_mb .proc_handler = &proc_max_dirty_pages_in_mb
}, },
{ {
INIT_CTL_NAME(OBD_AT_MIN)
.procname = "at_min", .procname = "at_min",
.data = &at_min, .data = &at_min,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -378,7 +366,6 @@ static ctl_table_t obd_table[] = { ...@@ -378,7 +366,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_at_min .proc_handler = &proc_at_min
}, },
{ {
INIT_CTL_NAME(OBD_AT_MAX)
.procname = "at_max", .procname = "at_max",
.data = &at_max, .data = &at_max,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -386,7 +373,6 @@ static ctl_table_t obd_table[] = { ...@@ -386,7 +373,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_at_max .proc_handler = &proc_at_max
}, },
{ {
INIT_CTL_NAME(OBD_AT_EXTRA)
.procname = "at_extra", .procname = "at_extra",
.data = &at_extra, .data = &at_extra,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -394,7 +380,6 @@ static ctl_table_t obd_table[] = { ...@@ -394,7 +380,6 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_at_extra .proc_handler = &proc_at_extra
}, },
{ {
INIT_CTL_NAME(OBD_AT_EARLY_MARGIN)
.procname = "at_early_margin", .procname = "at_early_margin",
.data = &at_early_margin, .data = &at_early_margin,
.maxlen = sizeof(int), .maxlen = sizeof(int),
...@@ -402,26 +387,22 @@ static ctl_table_t obd_table[] = { ...@@ -402,26 +387,22 @@ static ctl_table_t obd_table[] = {
.proc_handler = &proc_at_early_margin .proc_handler = &proc_at_early_margin
}, },
{ {
INIT_CTL_NAME(OBD_AT_HISTORY)
.procname = "at_history", .procname = "at_history",
.data = &at_history, .data = &at_history,
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = &proc_at_history .proc_handler = &proc_at_history
}, }
{ INIT_CTL_NAME(0) }
}; };
static ctl_table_t parent_table[] = { static ctl_table_t parent_table[] = {
{ {
INIT_CTL_NAME(OBD_SYSCTL)
.procname = "lustre", .procname = "lustre",
.data = NULL, .data = NULL,
.maxlen = 0, .maxlen = 0,
.mode = 0555, .mode = 0555,
.child = obd_table .child = obd_table
}, }
{ INIT_CTL_NAME(0) }
}; };
#endif #endif
......
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