sctp: Do not account for sizeof(struct sk_buff) in estimated rwnd
[linux-2.6.git] / net / rds / iw_sysctl.c
index 9590678..e2e4717 100644 (file)
@@ -55,70 +55,64 @@ static unsigned long rds_iw_sysctl_max_unsig_bytes_max = ~0UL;
 
 unsigned int rds_iw_sysctl_flow_control = 1;
 
-ctl_table rds_iw_sysctl_table[] = {
+static ctl_table rds_iw_sysctl_table[] = {
        {
-               .ctl_name       = CTL_UNNUMBERED,
                .procname       = "max_send_wr",
                .data           = &rds_iw_sysctl_max_send_wr,
                .maxlen         = sizeof(unsigned long),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = proc_doulongvec_minmax,
                .extra1         = &rds_iw_sysctl_max_wr_min,
                .extra2         = &rds_iw_sysctl_max_wr_max,
        },
        {
-               .ctl_name       = CTL_UNNUMBERED,
                .procname       = "max_recv_wr",
                .data           = &rds_iw_sysctl_max_recv_wr,
                .maxlen         = sizeof(unsigned long),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = proc_doulongvec_minmax,
                .extra1         = &rds_iw_sysctl_max_wr_min,
                .extra2         = &rds_iw_sysctl_max_wr_max,
        },
        {
-               .ctl_name       = CTL_UNNUMBERED,
                .procname       = "max_unsignaled_wr",
                .data           = &rds_iw_sysctl_max_unsig_wrs,
                .maxlen         = sizeof(unsigned long),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = proc_doulongvec_minmax,
                .extra1         = &rds_iw_sysctl_max_unsig_wr_min,
                .extra2         = &rds_iw_sysctl_max_unsig_wr_max,
        },
        {
-               .ctl_name       = CTL_UNNUMBERED,
                .procname       = "max_unsignaled_bytes",
                .data           = &rds_iw_sysctl_max_unsig_bytes,
                .maxlen         = sizeof(unsigned long),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = proc_doulongvec_minmax,
                .extra1         = &rds_iw_sysctl_max_unsig_bytes_min,
                .extra2         = &rds_iw_sysctl_max_unsig_bytes_max,
        },
        {
-               .ctl_name       = CTL_UNNUMBERED,
                .procname       = "max_recv_allocation",
                .data           = &rds_iw_sysctl_max_recv_allocation,
                .maxlen         = sizeof(unsigned long),
                .mode           = 0644,
-               .proc_handler   = &proc_doulongvec_minmax,
+               .proc_handler   = proc_doulongvec_minmax,
        },
        {
-               .ctl_name       = CTL_UNNUMBERED,
                .procname       = "flow_control",
                .data           = &rds_iw_sysctl_flow_control,
                .maxlen         = sizeof(rds_iw_sysctl_flow_control),
                .mode           = 0644,
-               .proc_handler   = &proc_dointvec,
+               .proc_handler   = proc_dointvec,
        },
-       { .ctl_name = 0}
+       { }
 };
 
 static struct ctl_path rds_iw_sysctl_path[] = {
-       { .procname = "net", .ctl_name = CTL_NET, },
-       { .procname = "rds", .ctl_name = CTL_UNNUMBERED, },
-       { .procname = "iw", .ctl_name = CTL_UNNUMBERED, },
+       { .procname = "net", },
+       { .procname = "rds", },
+       { .procname = "iw", },
        { }
 };
 
@@ -128,10 +122,10 @@ void rds_iw_sysctl_exit(void)
                unregister_sysctl_table(rds_iw_sysctl_hdr);
 }
 
-int __init rds_iw_sysctl_init(void)
+int rds_iw_sysctl_init(void)
 {
        rds_iw_sysctl_hdr = register_sysctl_paths(rds_iw_sysctl_path, rds_iw_sysctl_table);
-       if (rds_iw_sysctl_hdr == NULL)
+       if (!rds_iw_sysctl_hdr)
                return -ENOMEM;
        return 0;
 }