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>
This commit is contained in:
committed by
David S. Miller
parent
1ded132d4c
commit
dfd56b8b38
@@ -25,7 +25,7 @@
|
||||
#define _PROTOCOL_H
|
||||
|
||||
#include <linux/in6.h>
|
||||
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
#include <linux/ipv6.h>
|
||||
#endif
|
||||
|
||||
@@ -46,7 +46,7 @@ struct net_protocol {
|
||||
netns_ok:1;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
struct inet6_protocol {
|
||||
int (*handler)(struct sk_buff *skb);
|
||||
|
||||
@@ -91,7 +91,7 @@ struct inet_protosw {
|
||||
|
||||
extern const struct net_protocol __rcu *inet_protos[MAX_INET_PROTOS];
|
||||
|
||||
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
extern const struct inet6_protocol __rcu *inet6_protos[MAX_INET_PROTOS];
|
||||
#endif
|
||||
|
||||
@@ -100,7 +100,7 @@ extern int inet_del_protocol(const struct net_protocol *prot, unsigned char num)
|
||||
extern void inet_register_protosw(struct inet_protosw *p);
|
||||
extern void inet_unregister_protosw(struct inet_protosw *p);
|
||||
|
||||
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
extern int inet6_add_protocol(const struct inet6_protocol *prot, unsigned char num);
|
||||
extern int inet6_del_protocol(const struct inet6_protocol *prot, unsigned char num);
|
||||
extern int inet6_register_protosw(struct inet_protosw *p);
|
||||
|
||||
Reference in New Issue
Block a user