staging/lustre/o2iblnd: remove kib_sysctl
authorPeng Tao <bergwolf@gmail.com>
Tue, 19 Nov 2013 14:38:39 +0000 (22:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Nov 2013 18:42:07 +0000 (10:42 -0800)
we have #define CFS_SYSFS_MODULE_PARM  1
so it is indeed dead code.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c

index 86397f96b0331e217b38061aa434a6cfb0143518..644a0000130a469cee58b18b760020dc823d3d8d 100644 (file)
@@ -3230,7 +3230,6 @@ void __exit
 kiblnd_module_fini (void)
 {
        lnet_unregister_lnd(&the_o2iblnd);
-       kiblnd_tunables_fini();
 }
 
 int __init
index 938df0cf8c64c4a18f1fa60b02d16fdb3487005a..3f83ce4871cf118a841e4c8d8782213ee1654ebd 100644 (file)
@@ -106,9 +106,6 @@ typedef struct
        int           *kib_fmr_pool_size;    /* # FMRs in pool */
        int           *kib_fmr_flush_trigger; /* When to trigger FMR flush */
        int           *kib_fmr_cache;   /* enable FMR pool cache? */
-#if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-       ctl_table_header_t *kib_sysctl;  /* sysctl interface */
-#endif
        int           *kib_require_priv_port;/* accept only privileged ports */
        int           *kib_use_priv_port;    /* use privileged port for active connect */
        /* # threads on each CPT */
index 92dc5672e2ddf893f0304f10be53f466c266605f..cc291d00dba0dd5d49419c1e93d93165d8ec8d62 100644 (file)
@@ -176,261 +176,6 @@ kib_tunables_t kiblnd_tunables = {
        .kib_nscheds                = &nscheds
 };
 
-#if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
-
-static char ipif_basename_space[32];
-
-
-enum {
-       O2IBLND_SERVICE  = 1,
-       O2IBLND_CKSUM,
-       O2IBLND_TIMEOUT,
-       O2IBLND_NTX,
-       O2IBLND_CREDITS,
-       O2IBLND_PEER_TXCREDITS,
-       O2IBLND_PEER_CREDITS_HIW,
-       O2IBLND_PEER_RTRCREDITS,
-       O2IBLND_PEER_TIMEOUT,
-       O2IBLND_IPIF_BASENAME,
-       O2IBLND_RETRY_COUNT,
-       O2IBLND_RNR_RETRY_COUNT,
-       O2IBLND_KEEPALIVE,
-       O2IBLND_CONCURRENT_SENDS,
-       O2IBLND_IB_MTU,
-       O2IBLND_MAP_ON_DEMAND,
-       O2IBLND_FMR_POOL_SIZE,
-       O2IBLND_FMR_FLUSH_TRIGGER,
-       O2IBLND_FMR_CACHE,
-       O2IBLND_PMR_POOL_SIZE,
-       O2IBLND_DEV_FAILOVER
-};
-
-static ctl_table_t kiblnd_ctl_table[] = {
-       {
-               .ctl_name = O2IBLND_SERVICE,
-               .procname = "service",
-               .data     = &service,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_CKSUM,
-               .procname = "cksum",
-               .data     = &cksum,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_TIMEOUT,
-               .procname = "timeout",
-               .data     = &timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_NTX,
-               .procname = "ntx",
-               .data     = &ntx,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_CREDITS,
-               .procname = "credits",
-               .data     = &credits,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_PEER_TXCREDITS,
-               .procname = "peer_credits",
-               .data     = &peer_credits,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_PEER_CREDITS_HIW,
-               .procname = "peer_credits_hiw",
-               .data     = &peer_credits_hiw,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_PEER_RTRCREDITS,
-               .procname = "peer_buffer_credits",
-               .data     = &peer_buffer_credits,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_PEER_TIMEOUT,
-               .procname = "peer_timeout",
-               .data     = &peer_timeout,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_IPIF_BASENAME,
-               .procname = "ipif_name",
-               .data     = ipif_basename_space,
-               .maxlen   = sizeof(ipif_basename_space),
-               .mode     = 0444,
-               .proc_handler = &proc_dostring
-       },
-       {
-               .ctl_name = O2IBLND_RETRY_COUNT,
-               .procname = "retry_count",
-               .data     = &retry_count,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_RNR_RETRY_COUNT,
-               .procname = "rnr_retry_count",
-               .data     = &rnr_retry_count,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_KEEPALIVE,
-               .procname = "keepalive",
-               .data     = &keepalive,
-               .maxlen   = sizeof(int),
-               .mode     = 0644,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_CONCURRENT_SENDS,
-               .procname = "concurrent_sends",
-               .data     = &concurrent_sends,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_IB_MTU,
-               .procname = "ib_mtu",
-               .data     = &ib_mtu,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_MAP_ON_DEMAND,
-               .procname = "map_on_demand",
-               .data     = &map_on_demand,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-
-       {
-               .ctl_name = O2IBLND_FMR_POOL_SIZE,
-               .procname = "fmr_pool_size",
-               .data     = &fmr_pool_size,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_FMR_FLUSH_TRIGGER,
-               .procname = "fmr_flush_trigger",
-               .data     = &fmr_flush_trigger,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_FMR_CACHE,
-               .procname = "fmr_cache",
-               .data     = &fmr_cache,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_PMR_POOL_SIZE,
-               .procname = "pmr_pool_size",
-               .data     = &pmr_pool_size,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {
-               .ctl_name = O2IBLND_DEV_FAILOVER,
-               .procname = "dev_failover",
-               .data     = &dev_failover,
-               .maxlen   = sizeof(int),
-               .mode     = 0444,
-               .proc_handler = &proc_dointvec
-       },
-       {0}
-};
-
-static ctl_table_t kiblnd_top_ctl_table[] = {
-       {
-               .ctl_name = CTL_O2IBLND,
-               .procname = "o2iblnd",
-               .data     = NULL,
-               .maxlen   = 0,
-               .mode     = 0555,
-               .child    = kiblnd_ctl_table
-       },
-       {0}
-};
-
-void
-kiblnd_initstrtunable(char *space, char *str, int size)
-{
-       strncpy(space, str, size);
-       space[size-1] = 0;
-}
-
-void
-kiblnd_sysctl_init (void)
-{
-       kiblnd_initstrtunable(ipif_basename_space, ipif_name,
-                             sizeof(ipif_basename_space));
-
-       kiblnd_tunables.kib_sysctl =
-               register_sysctl_table(kiblnd_top_ctl_table);
-
-       if (kiblnd_tunables.kib_sysctl == NULL)
-               CWARN("Can't setup /proc tunables\n");
-}
-
-void
-kiblnd_sysctl_fini (void)
-{
-       if (kiblnd_tunables.kib_sysctl != NULL)
-               unregister_sysctl_table(kiblnd_tunables.kib_sysctl);
-}
-
-#else
-
-void
-kiblnd_sysctl_init (void)
-{
-}
-
-void
-kiblnd_sysctl_fini (void)
-{
-}
-
-#endif
-
 int
 kiblnd_tunables_init (void)
 {
@@ -482,12 +227,5 @@ kiblnd_tunables_init (void)
                      *kiblnd_tunables.kib_concurrent_sends, *kiblnd_tunables.kib_peertxcredits);
        }
 
-       kiblnd_sysctl_init();
        return 0;
 }
-
-void
-kiblnd_tunables_fini (void)
-{
-       kiblnd_sysctl_fini();
-}