aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-12-10 04:48:31 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-11 18:25:16 -0500
commitdfd56b8b38fff3586f36232db58e1e9f7885a605 (patch)
tree64c7142ebf4625939f68bd3603f1d37bacb20a73 /include/linux
parent1ded132d4c3442aa3a619c94c245d7b5e0eb9731 (diff)
net: use IS_ENABLED(CONFIG_IPV6)
Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/errqueue.h4
-rw-r--r--include/linux/ipv6.h4
-rw-r--r--include/linux/lockd/lockd.h6
-rw-r--r--include/linux/sunrpc/clnt.h6
4 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h
index c9f522bd17e4..fd0628be45ce 100644
--- a/include/linux/errqueue.h
+++ b/include/linux/errqueue.h
@@ -25,7 +25,7 @@ struct sock_extended_err {
25#ifdef __KERNEL__ 25#ifdef __KERNEL__
26 26
27#include <net/ip.h> 27#include <net/ip.h>
28#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 28#if IS_ENABLED(CONFIG_IPV6)
29#include <linux/ipv6.h> 29#include <linux/ipv6.h>
30#endif 30#endif
31 31
@@ -34,7 +34,7 @@ struct sock_extended_err {
34struct sock_exterr_skb { 34struct sock_exterr_skb {
35 union { 35 union {
36 struct inet_skb_parm h4; 36 struct inet_skb_parm h4;
37#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 37#if IS_ENABLED(CONFIG_IPV6)
38 struct inet6_skb_parm h6; 38 struct inet6_skb_parm h6;
39#endif 39#endif
40 } header; 40 } header;
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 0c997767429a..6318268dcaf5 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -404,7 +404,7 @@ struct tcp6_sock {
404 404
405extern int inet6_sk_rebuild_header(struct sock *sk); 405extern int inet6_sk_rebuild_header(struct sock *sk);
406 406
407#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 407#if IS_ENABLED(CONFIG_IPV6)
408static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) 408static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
409{ 409{
410 return inet_sk(__sk)->pinet6; 410 return inet_sk(__sk)->pinet6;
@@ -515,7 +515,7 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk)
515#define inet6_rcv_saddr(__sk) NULL 515#define inet6_rcv_saddr(__sk) NULL
516#define tcp_twsk_ipv6only(__sk) 0 516#define tcp_twsk_ipv6only(__sk) 0
517#define inet_v6_ipv6only(__sk) 0 517#define inet_v6_ipv6only(__sk) 0
518#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ 518#endif /* IS_ENABLED(CONFIG_IPV6) */
519 519
520#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\ 520#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\
521 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ 521 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index ff9abff55aa0..90b0656a869e 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -301,7 +301,7 @@ static inline int __nlm_privileged_request4(const struct sockaddr *sap)
301 return ipv4_is_loopback(sin->sin_addr.s_addr); 301 return ipv4_is_loopback(sin->sin_addr.s_addr);
302} 302}
303 303
304#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 304#if IS_ENABLED(CONFIG_IPV6)
305static inline int __nlm_privileged_request6(const struct sockaddr *sap) 305static inline int __nlm_privileged_request6(const struct sockaddr *sap)
306{ 306{
307 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap; 307 const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap;
@@ -314,12 +314,12 @@ static inline int __nlm_privileged_request6(const struct sockaddr *sap)
314 314
315 return ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LOOPBACK; 315 return ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LOOPBACK;
316} 316}
317#else /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ 317#else /* IS_ENABLED(CONFIG_IPV6) */
318static inline int __nlm_privileged_request6(const struct sockaddr *sap) 318static inline int __nlm_privileged_request6(const struct sockaddr *sap)
319{ 319{
320 return 0; 320 return 0;
321} 321}
322#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ 322#endif /* IS_ENABLED(CONFIG_IPV6) */
323 323
324/* 324/*
325 * Ensure incoming requests are from local privileged callers. 325 * Ensure incoming requests are from local privileged callers.
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index f15fd985b08a..2c5993a17c33 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -215,7 +215,7 @@ static inline bool __rpc_copy_addr4(struct sockaddr *dst,
215 return true; 215 return true;
216} 216}
217 217
218#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 218#if IS_ENABLED(CONFIG_IPV6)
219static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1, 219static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1,
220 const struct sockaddr *sap2) 220 const struct sockaddr *sap2)
221{ 221{
@@ -240,7 +240,7 @@ static inline bool __rpc_copy_addr6(struct sockaddr *dst,
240 dsin6->sin6_addr = ssin6->sin6_addr; 240 dsin6->sin6_addr = ssin6->sin6_addr;
241 return true; 241 return true;
242} 242}
243#else /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ 243#else /* !(IS_ENABLED(CONFIG_IPV6) */
244static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1, 244static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1,
245 const struct sockaddr *sap2) 245 const struct sockaddr *sap2)
246{ 246{
@@ -252,7 +252,7 @@ static inline bool __rpc_copy_addr6(struct sockaddr *dst,
252{ 252{
253 return false; 253 return false;
254} 254}
255#endif /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ 255#endif /* !(IS_ENABLED(CONFIG_IPV6) */
256 256
257/** 257/**
258 * rpc_cmp_addr - compare the address portion of two sockaddrs. 258 * rpc_cmp_addr - compare the address portion of two sockaddrs.