A few headers contain instances of: #if defined(CONFIG_XXX) or defined(CONFIG_XXX_MODULE) Replace them with: #if IS_ENABLED(CONFIG_XXX)
Unified · Split
| @@ -422,7 +422,7 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) · 421 unmodified lines | |||
| 422 | } | 422 | } |
| 423 | #endif /*CONFIG_NETFILTER*/ | 423 | #endif /*CONFIG_NETFILTER*/ |
| 424 | 424 | ||
| 425 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 425 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) |
| 426 | #include <linux/netfilter/nf_conntrack_zones_common.h> | 426 | #include <linux/netfilter/nf_conntrack_zones_common.h> |
| 427 | 427 | ||
| 428 | extern void (*ip_ct_attach)(struct sk_buff *, const struct sk_buff *) __rcu; | 428 | extern void (*ip_ct_attach)(struct sk_buff *, const struct sk_buff *) __rcu; |
| @@ -9,7 +9,7 @@ · 8 unmodified lines | |||
| 9 | extern bool ip_set_get_ip4_port(const struct sk_buff *skb, bool src, | 9 | extern bool ip_set_get_ip4_port(const struct sk_buff *skb, bool src, |
| 10 | __be16 *port, u8 *proto); | 10 | __be16 *port, u8 *proto); |
| 11 | 11 | ||
| 12 | #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) | 12 | #if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) |
| 13 | extern bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, | 13 | extern bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, |
| 14 | __be16 *port, u8 *proto); | 14 | __be16 *port, u8 *proto); |
| 15 | #else | 15 | #else |
| @@ -8,7 +8,7 @@ · 7 unmodified lines | |||
| 8 | 8 | ||
| 9 | enum nf_ct_ext_id { | 9 | enum nf_ct_ext_id { |
| 10 | NF_CT_EXT_HELPER, | 10 | NF_CT_EXT_HELPER, |
| 11 | #if defined(CONFIG_NF_NAT) || defined(CONFIG_NF_NAT_MODULE) | 11 | #if IS_ENABLED(CONFIG_NF_NAT) |
| 12 | NF_CT_EXT_NAT, | 12 | NF_CT_EXT_NAT, |
| 13 | #endif | 13 | #endif |
| 14 | NF_CT_EXT_SEQADJ, | 14 | NF_CT_EXT_SEQADJ, |
| @@ -22,7 +22,7 @@ enum nf_nat_manip_type { · 21 unmodified lines | |||
| 22 | /* per conntrack: nat application helper private data */ | 22 | /* per conntrack: nat application helper private data */ |
| 23 | union nf_conntrack_nat_help { | 23 | union nf_conntrack_nat_help { |
| 24 | /* insert nat helper private data here */ | 24 | /* insert nat helper private data here */ |
| 25 | #if defined(CONFIG_NF_NAT_PPTP) || defined(CONFIG_NF_NAT_PPTP_MODULE) | 25 | #if IS_ENABLED(CONFIG_NF_NAT_PPTP) |
| 26 | struct nf_nat_pptp nat_pptp_info; | 26 | struct nf_nat_pptp nat_pptp_info; |
| 27 | #endif | 27 | #endif |
| 28 | }; | 28 | }; |
| @@ -47,7 +47,7 @@ struct nf_conn_nat *nf_ct_nat_ext_add(struct nf_conn *ct); · 18 unmodified lines | |||
| 47 | 47 | ||
| 48 | static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) | 48 | static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) |
| 49 | { | 49 | { |
| 50 | #if defined(CONFIG_NF_NAT) || defined(CONFIG_NF_NAT_MODULE) | 50 | #if IS_ENABLED(CONFIG_NF_NAT) |
| 51 | return nf_ct_ext_find(ct, NF_CT_EXT_NAT); | 51 | return nf_ct_ext_find(ct, NF_CT_EXT_NAT); |
| 52 | #else | 52 | #else |
| 53 | return NULL; | 53 | return NULL; |