aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-03 21:21:05 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-03 21:21:05 -0500
commit6d9f239a1edb31d6133230f478fd1dc2da338ec5 (patch)
tree305fa0da95a49db4e342f3f3042f8be0968b03ce /net/core
parent6cf3f41e6c08bca6641a695449791c38a25f35ff (diff)
net: '&' redux
I want to compile out proc_* and sysctl_* handlers totally and stub them to NULL depending on config options, however usage of & will prevent this, since taking adress of NULL pointer will break compilation. So, drop & in front of every ->proc_handler and every ->strategy handler, it was never needed in fact. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c48
-rw-r--r--net/core/sysctl_net_core.c34
2 files changed, 41 insertions, 41 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index b337a937ea52..d9bbe010e0ee 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2566,128 +2566,128 @@ static struct neigh_sysctl_table {
2566 .procname = "mcast_solicit", 2566 .procname = "mcast_solicit",
2567 .maxlen = sizeof(int), 2567 .maxlen = sizeof(int),
2568 .mode = 0644, 2568 .mode = 0644,
2569 .proc_handler = &proc_dointvec, 2569 .proc_handler = proc_dointvec,
2570 }, 2570 },
2571 { 2571 {
2572 .ctl_name = NET_NEIGH_UCAST_SOLICIT, 2572 .ctl_name = NET_NEIGH_UCAST_SOLICIT,
2573 .procname = "ucast_solicit", 2573 .procname = "ucast_solicit",
2574 .maxlen = sizeof(int), 2574 .maxlen = sizeof(int),
2575 .mode = 0644, 2575 .mode = 0644,
2576 .proc_handler = &proc_dointvec, 2576 .proc_handler = proc_dointvec,
2577 }, 2577 },
2578 { 2578 {
2579 .ctl_name = NET_NEIGH_APP_SOLICIT, 2579 .ctl_name = NET_NEIGH_APP_SOLICIT,
2580 .procname = "app_solicit", 2580 .procname = "app_solicit",
2581 .maxlen = sizeof(int), 2581 .maxlen = sizeof(int),
2582 .mode = 0644, 2582 .mode = 0644,
2583 .proc_handler = &proc_dointvec, 2583 .proc_handler = proc_dointvec,
2584 }, 2584 },
2585 { 2585 {
2586 .procname = "retrans_time", 2586 .procname = "retrans_time",
2587 .maxlen = sizeof(int), 2587 .maxlen = sizeof(int),
2588 .mode = 0644, 2588 .mode = 0644,
2589 .proc_handler = &proc_dointvec_userhz_jiffies, 2589 .proc_handler = proc_dointvec_userhz_jiffies,
2590 }, 2590 },
2591 { 2591 {
2592 .ctl_name = NET_NEIGH_REACHABLE_TIME, 2592 .ctl_name = NET_NEIGH_REACHABLE_TIME,
2593 .procname = "base_reachable_time", 2593 .procname = "base_reachable_time",
2594 .maxlen = sizeof(int), 2594 .maxlen = sizeof(int),
2595 .mode = 0644, 2595 .mode = 0644,
2596 .proc_handler = &proc_dointvec_jiffies, 2596 .proc_handler = proc_dointvec_jiffies,
2597 .strategy = &sysctl_jiffies, 2597 .strategy = sysctl_jiffies,
2598 }, 2598 },
2599 { 2599 {
2600 .ctl_name = NET_NEIGH_DELAY_PROBE_TIME, 2600 .ctl_name = NET_NEIGH_DELAY_PROBE_TIME,
2601 .procname = "delay_first_probe_time", 2601 .procname = "delay_first_probe_time",
2602 .maxlen = sizeof(int), 2602 .maxlen = sizeof(int),
2603 .mode = 0644, 2603 .mode = 0644,
2604 .proc_handler = &proc_dointvec_jiffies, 2604 .proc_handler = proc_dointvec_jiffies,
2605 .strategy = &sysctl_jiffies, 2605 .strategy = sysctl_jiffies,
2606 }, 2606 },
2607 { 2607 {
2608 .ctl_name = NET_NEIGH_GC_STALE_TIME, 2608 .ctl_name = NET_NEIGH_GC_STALE_TIME,
2609 .procname = "gc_stale_time", 2609 .procname = "gc_stale_time",
2610 .maxlen = sizeof(int), 2610 .maxlen = sizeof(int),
2611 .mode = 0644, 2611 .mode = 0644,
2612 .proc_handler = &proc_dointvec_jiffies, 2612 .proc_handler = proc_dointvec_jiffies,
2613 .strategy = &sysctl_jiffies, 2613 .strategy = sysctl_jiffies,
2614 }, 2614 },
2615 { 2615 {
2616 .ctl_name = NET_NEIGH_UNRES_QLEN, 2616 .ctl_name = NET_NEIGH_UNRES_QLEN,
2617 .procname = "unres_qlen", 2617 .procname = "unres_qlen",
2618 .maxlen = sizeof(int), 2618 .maxlen = sizeof(int),
2619 .mode = 0644, 2619 .mode = 0644,
2620 .proc_handler = &proc_dointvec, 2620 .proc_handler = proc_dointvec,
2621 }, 2621 },
2622 { 2622 {
2623 .ctl_name = NET_NEIGH_PROXY_QLEN, 2623 .ctl_name = NET_NEIGH_PROXY_QLEN,
2624 .procname = "proxy_qlen", 2624 .procname = "proxy_qlen",
2625 .maxlen = sizeof(int), 2625 .maxlen = sizeof(int),
2626 .mode = 0644, 2626 .mode = 0644,
2627 .proc_handler = &proc_dointvec, 2627 .proc_handler = proc_dointvec,
2628 }, 2628 },
2629 { 2629 {
2630 .procname = "anycast_delay", 2630 .procname = "anycast_delay",
2631 .maxlen = sizeof(int), 2631 .maxlen = sizeof(int),
2632 .mode = 0644, 2632 .mode = 0644,
2633 .proc_handler = &proc_dointvec_userhz_jiffies, 2633 .proc_handler = proc_dointvec_userhz_jiffies,
2634 }, 2634 },
2635 { 2635 {
2636 .procname = "proxy_delay", 2636 .procname = "proxy_delay",
2637 .maxlen = sizeof(int), 2637 .maxlen = sizeof(int),
2638 .mode = 0644, 2638 .mode = 0644,
2639 .proc_handler = &proc_dointvec_userhz_jiffies, 2639 .proc_handler = proc_dointvec_userhz_jiffies,
2640 }, 2640 },
2641 { 2641 {
2642 .procname = "locktime", 2642 .procname = "locktime",
2643 .maxlen = sizeof(int), 2643 .maxlen = sizeof(int),
2644 .mode = 0644, 2644 .mode = 0644,
2645 .proc_handler = &proc_dointvec_userhz_jiffies, 2645 .proc_handler = proc_dointvec_userhz_jiffies,
2646 }, 2646 },
2647 { 2647 {
2648 .ctl_name = NET_NEIGH_RETRANS_TIME_MS, 2648 .ctl_name = NET_NEIGH_RETRANS_TIME_MS,
2649 .procname = "retrans_time_ms", 2649 .procname = "retrans_time_ms",
2650 .maxlen = sizeof(int), 2650 .maxlen = sizeof(int),
2651 .mode = 0644, 2651 .mode = 0644,
2652 .proc_handler = &proc_dointvec_ms_jiffies, 2652 .proc_handler = proc_dointvec_ms_jiffies,
2653 .strategy = &sysctl_ms_jiffies, 2653 .strategy = sysctl_ms_jiffies,
2654 }, 2654 },
2655 { 2655 {
2656 .ctl_name = NET_NEIGH_REACHABLE_TIME_MS, 2656 .ctl_name = NET_NEIGH_REACHABLE_TIME_MS,
2657 .procname = "base_reachable_time_ms", 2657 .procname = "base_reachable_time_ms",
2658 .maxlen = sizeof(int), 2658 .maxlen = sizeof(int),
2659 .mode = 0644, 2659 .mode = 0644,
2660 .proc_handler = &proc_dointvec_ms_jiffies, 2660 .proc_handler = proc_dointvec_ms_jiffies,
2661 .strategy = &sysctl_ms_jiffies, 2661 .strategy = sysctl_ms_jiffies,
2662 }, 2662 },
2663 { 2663 {
2664 .ctl_name = NET_NEIGH_GC_INTERVAL, 2664 .ctl_name = NET_NEIGH_GC_INTERVAL,
2665 .procname = "gc_interval", 2665 .procname = "gc_interval",
2666 .maxlen = sizeof(int), 2666 .maxlen = sizeof(int),
2667 .mode = 0644, 2667 .mode = 0644,
2668 .proc_handler = &proc_dointvec_jiffies, 2668 .proc_handler = proc_dointvec_jiffies,
2669 .strategy = &sysctl_jiffies, 2669 .strategy = sysctl_jiffies,
2670 }, 2670 },
2671 { 2671 {
2672 .ctl_name = NET_NEIGH_GC_THRESH1, 2672 .ctl_name = NET_NEIGH_GC_THRESH1,
2673 .procname = "gc_thresh1", 2673 .procname = "gc_thresh1",
2674 .maxlen = sizeof(int), 2674 .maxlen = sizeof(int),
2675 .mode = 0644, 2675 .mode = 0644,
2676 .proc_handler = &proc_dointvec, 2676 .proc_handler = proc_dointvec,
2677 }, 2677 },
2678 { 2678 {
2679 .ctl_name = NET_NEIGH_GC_THRESH2, 2679 .ctl_name = NET_NEIGH_GC_THRESH2,
2680 .procname = "gc_thresh2", 2680 .procname = "gc_thresh2",
2681 .maxlen = sizeof(int), 2681 .maxlen = sizeof(int),
2682 .mode = 0644, 2682 .mode = 0644,
2683 .proc_handler = &proc_dointvec, 2683 .proc_handler = proc_dointvec,
2684 }, 2684 },
2685 { 2685 {
2686 .ctl_name = NET_NEIGH_GC_THRESH3, 2686 .ctl_name = NET_NEIGH_GC_THRESH3,
2687 .procname = "gc_thresh3", 2687 .procname = "gc_thresh3",
2688 .maxlen = sizeof(int), 2688 .maxlen = sizeof(int),
2689 .mode = 0644, 2689 .mode = 0644,
2690 .proc_handler = &proc_dointvec, 2690 .proc_handler = proc_dointvec,
2691 }, 2691 },
2692 {}, 2692 {},
2693 }, 2693 },
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index f686467ff12b..2bc0384b0448 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -22,7 +22,7 @@ static struct ctl_table net_core_table[] = {
22 .data = &sysctl_wmem_max, 22 .data = &sysctl_wmem_max,
23 .maxlen = sizeof(int), 23 .maxlen = sizeof(int),
24 .mode = 0644, 24 .mode = 0644,
25 .proc_handler = &proc_dointvec 25 .proc_handler = proc_dointvec
26 }, 26 },
27 { 27 {
28 .ctl_name = NET_CORE_RMEM_MAX, 28 .ctl_name = NET_CORE_RMEM_MAX,
@@ -30,7 +30,7 @@ static struct ctl_table net_core_table[] = {
30 .data = &sysctl_rmem_max, 30 .data = &sysctl_rmem_max,
31 .maxlen = sizeof(int), 31 .maxlen = sizeof(int),
32 .mode = 0644, 32 .mode = 0644,
33 .proc_handler = &proc_dointvec 33 .proc_handler = proc_dointvec
34 }, 34 },
35 { 35 {
36 .ctl_name = NET_CORE_WMEM_DEFAULT, 36 .ctl_name = NET_CORE_WMEM_DEFAULT,
@@ -38,7 +38,7 @@ static struct ctl_table net_core_table[] = {
38 .data = &sysctl_wmem_default, 38 .data = &sysctl_wmem_default,
39 .maxlen = sizeof(int), 39 .maxlen = sizeof(int),
40 .mode = 0644, 40 .mode = 0644,
41 .proc_handler = &proc_dointvec 41 .proc_handler = proc_dointvec
42 }, 42 },
43 { 43 {
44 .ctl_name = NET_CORE_RMEM_DEFAULT, 44 .ctl_name = NET_CORE_RMEM_DEFAULT,
@@ -46,7 +46,7 @@ static struct ctl_table net_core_table[] = {
46 .data = &sysctl_rmem_default, 46 .data = &sysctl_rmem_default,
47 .maxlen = sizeof(int), 47 .maxlen = sizeof(int),
48 .mode = 0644, 48 .mode = 0644,
49 .proc_handler = &proc_dointvec 49 .proc_handler = proc_dointvec
50 }, 50 },
51 { 51 {
52 .ctl_name = NET_CORE_DEV_WEIGHT, 52 .ctl_name = NET_CORE_DEV_WEIGHT,
@@ -54,7 +54,7 @@ static struct ctl_table net_core_table[] = {
54 .data = &weight_p, 54 .data = &weight_p,
55 .maxlen = sizeof(int), 55 .maxlen = sizeof(int),
56 .mode = 0644, 56 .mode = 0644,
57 .proc_handler = &proc_dointvec 57 .proc_handler = proc_dointvec
58 }, 58 },
59 { 59 {
60 .ctl_name = NET_CORE_MAX_BACKLOG, 60 .ctl_name = NET_CORE_MAX_BACKLOG,
@@ -62,7 +62,7 @@ static struct ctl_table net_core_table[] = {
62 .data = &netdev_max_backlog, 62 .data = &netdev_max_backlog,
63 .maxlen = sizeof(int), 63 .maxlen = sizeof(int),
64 .mode = 0644, 64 .mode = 0644,
65 .proc_handler = &proc_dointvec 65 .proc_handler = proc_dointvec
66 }, 66 },
67 { 67 {
68 .ctl_name = NET_CORE_MSG_COST, 68 .ctl_name = NET_CORE_MSG_COST,
@@ -70,8 +70,8 @@ static struct ctl_table net_core_table[] = {
70 .data = &net_ratelimit_state.interval, 70 .data = &net_ratelimit_state.interval,
71 .maxlen = sizeof(int), 71 .maxlen = sizeof(int),
72 .mode = 0644, 72 .mode = 0644,
73 .proc_handler = &proc_dointvec_jiffies, 73 .proc_handler = proc_dointvec_jiffies,
74 .strategy = &sysctl_jiffies, 74 .strategy = sysctl_jiffies,
75 }, 75 },
76 { 76 {
77 .ctl_name = NET_CORE_MSG_BURST, 77 .ctl_name = NET_CORE_MSG_BURST,
@@ -79,7 +79,7 @@ static struct ctl_table net_core_table[] = {
79 .data = &net_ratelimit_state.burst, 79 .data = &net_ratelimit_state.burst,
80 .maxlen = sizeof(int), 80 .maxlen = sizeof(int),
81 .mode = 0644, 81 .mode = 0644,
82 .proc_handler = &proc_dointvec, 82 .proc_handler = proc_dointvec,
83 }, 83 },
84 { 84 {
85 .ctl_name = NET_CORE_OPTMEM_MAX, 85 .ctl_name = NET_CORE_OPTMEM_MAX,
@@ -87,7 +87,7 @@ static struct ctl_table net_core_table[] = {
87 .data = &sysctl_optmem_max, 87 .data = &sysctl_optmem_max,
88 .maxlen = sizeof(int), 88 .maxlen = sizeof(int),
89 .mode = 0644, 89 .mode = 0644,
90 .proc_handler = &proc_dointvec 90 .proc_handler = proc_dointvec
91 }, 91 },
92#ifdef CONFIG_XFRM 92#ifdef CONFIG_XFRM
93 { 93 {
@@ -96,7 +96,7 @@ static struct ctl_table net_core_table[] = {
96 .data = &sysctl_xfrm_aevent_etime, 96 .data = &sysctl_xfrm_aevent_etime,
97 .maxlen = sizeof(u32), 97 .maxlen = sizeof(u32),
98 .mode = 0644, 98 .mode = 0644,
99 .proc_handler = &proc_dointvec 99 .proc_handler = proc_dointvec
100 }, 100 },
101 { 101 {
102 .ctl_name = NET_CORE_AEVENT_RSEQTH, 102 .ctl_name = NET_CORE_AEVENT_RSEQTH,
@@ -104,7 +104,7 @@ static struct ctl_table net_core_table[] = {
104 .data = &sysctl_xfrm_aevent_rseqth, 104 .data = &sysctl_xfrm_aevent_rseqth,
105 .maxlen = sizeof(u32), 105 .maxlen = sizeof(u32),
106 .mode = 0644, 106 .mode = 0644,
107 .proc_handler = &proc_dointvec 107 .proc_handler = proc_dointvec
108 }, 108 },
109 { 109 {
110 .ctl_name = CTL_UNNUMBERED, 110 .ctl_name = CTL_UNNUMBERED,
@@ -112,7 +112,7 @@ static struct ctl_table net_core_table[] = {
112 .data = &sysctl_xfrm_larval_drop, 112 .data = &sysctl_xfrm_larval_drop,
113 .maxlen = sizeof(int), 113 .maxlen = sizeof(int),
114 .mode = 0644, 114 .mode = 0644,
115 .proc_handler = &proc_dointvec 115 .proc_handler = proc_dointvec
116 }, 116 },
117 { 117 {
118 .ctl_name = CTL_UNNUMBERED, 118 .ctl_name = CTL_UNNUMBERED,
@@ -120,7 +120,7 @@ static struct ctl_table net_core_table[] = {
120 .data = &sysctl_xfrm_acq_expires, 120 .data = &sysctl_xfrm_acq_expires,
121 .maxlen = sizeof(int), 121 .maxlen = sizeof(int),
122 .mode = 0644, 122 .mode = 0644,
123 .proc_handler = &proc_dointvec 123 .proc_handler = proc_dointvec
124 }, 124 },
125#endif /* CONFIG_XFRM */ 125#endif /* CONFIG_XFRM */
126#endif /* CONFIG_NET */ 126#endif /* CONFIG_NET */
@@ -130,7 +130,7 @@ static struct ctl_table net_core_table[] = {
130 .data = &netdev_budget, 130 .data = &netdev_budget,
131 .maxlen = sizeof(int), 131 .maxlen = sizeof(int),
132 .mode = 0644, 132 .mode = 0644,
133 .proc_handler = &proc_dointvec 133 .proc_handler = proc_dointvec
134 }, 134 },
135 { 135 {
136 .ctl_name = NET_CORE_WARNINGS, 136 .ctl_name = NET_CORE_WARNINGS,
@@ -138,7 +138,7 @@ static struct ctl_table net_core_table[] = {
138 .data = &net_msg_warn, 138 .data = &net_msg_warn,
139 .maxlen = sizeof(int), 139 .maxlen = sizeof(int),
140 .mode = 0644, 140 .mode = 0644,
141 .proc_handler = &proc_dointvec 141 .proc_handler = proc_dointvec
142 }, 142 },
143 { .ctl_name = 0 } 143 { .ctl_name = 0 }
144}; 144};
@@ -150,7 +150,7 @@ static struct ctl_table netns_core_table[] = {
150 .data = &init_net.core.sysctl_somaxconn, 150 .data = &init_net.core.sysctl_somaxconn,
151 .maxlen = sizeof(int), 151 .maxlen = sizeof(int),
152 .mode = 0644, 152 .mode = 0644,
153 .proc_handler = &proc_dointvec 153 .proc_handler = proc_dointvec
154 }, 154 },
155 { .ctl_name = 0 } 155 { .ctl_name = 0 }
156}; 156};