From 770cfbcffdf0011ecf3a12435ecb5604c4c97a19 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 9 Jan 2006 15:56:09 -0800 Subject: [INET]: congestion and af_ops can be const The congestion ops and af_ops in the inet_connection_sock can be const. Signed-off-by: Stephen Hemminger Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- include/net/inet_connection_sock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 50234fa..fa587c9 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -83,8 +83,8 @@ struct inet_connection_sock { struct timer_list icsk_delack_timer; __u32 icsk_rto; __u32 icsk_pmtu_cookie; - struct tcp_congestion_ops *icsk_ca_ops; - struct inet_connection_sock_af_ops *icsk_af_ops; + const struct tcp_congestion_ops *icsk_ca_ops; + const struct inet_connection_sock_af_ops *icsk_af_ops; unsigned int (*icsk_sync_mss)(struct sock *sk, u32 pmtu); __u8 icsk_ca_state; __u8 icsk_retransmits; -- cgit v1.1 From bb94aa169eaa6e713a429370d37388722f08666f Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Mon, 9 Jan 2006 16:43:13 -0800 Subject: [NETFILTER]: net/ipv[46]/netfilter.c cleanups Don't wrap entire file in #ifdef CONFIG_NETFILTER, remove a few unneccessary includes. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- include/linux/netfilter_ipv6.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 53b2983..14f2bd0 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h @@ -72,7 +72,12 @@ enum nf_ip6_hook_priorities { NF_IP6_PRI_LAST = INT_MAX, }; +#ifdef CONFIG_NETFILTER extern int ipv6_netfilter_init(void); extern void ipv6_netfilter_fini(void); +#else /* CONFIG_NETFILTER */ +static inline int ipv6_netfilter_init(void) { return 0; } +static inline void ipv6_netfilter_fini(void) { return; } +#endif /* CONFIG_NETFILTER */ #endif /*__LINUX_IP6_NETFILTER_H*/ -- cgit v1.1 From 9d28026b7ec0f3e2a407d5c03fcb37d0b59d1add Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Mon, 9 Jan 2006 16:44:36 -0800 Subject: [NETFILTER]: Remove unused function from NAT protocol helpers ->print and ->print_range are not used (and apparently never were). Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- include/linux/netfilter_ipv4/ip_nat_protocol.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/linux/netfilter_ipv4/ip_nat_protocol.h b/include/linux/netfilter_ipv4/ip_nat_protocol.h index ef63aa9..612a436 100644 --- a/include/linux/netfilter_ipv4/ip_nat_protocol.h +++ b/include/linux/netfilter_ipv4/ip_nat_protocol.h @@ -42,13 +42,6 @@ struct ip_nat_protocol enum ip_nat_manip_type maniptype, const struct ip_conntrack *conntrack); - unsigned int (*print)(char *buffer, - const struct ip_conntrack_tuple *match, - const struct ip_conntrack_tuple *mask); - - unsigned int (*print_range)(char *buffer, - const struct ip_nat_range *range); - int (*range_to_nfattr)(struct sk_buff *skb, const struct ip_nat_range *range); -- cgit v1.1