aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorIgor Maravic <igorm@etf.rs>2011-12-04 21:25:57 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-06 00:34:40 -0500
commit40e4783ee62ac656a9a0fa3b512b6aee4f07d2d1 (patch)
tree813a2a4220b399bcd5d1bd16cc5a9248978bff47 /net/ipv4
parent0a5912db7b4f9c3ff3bd0dbb67f36484a3b21a35 (diff)
ipv4: arp: Cleanup in arp.c
Use "IS_ENABLED(CONFIG_FOO)" macro instead of "defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)" Signed-off-by: Igor Maravic <igorm@etf.rs> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/arp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index ff324ebc8893..381a0876c363 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -277,9 +277,9 @@ static int arp_constructor(struct neighbour *neigh)
277 default: 277 default:
278 break; 278 break;
279 case ARPHRD_ROSE: 279 case ARPHRD_ROSE:
280#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 280#if IS_ENABLED(CONFIG_AX25)
281 case ARPHRD_AX25: 281 case ARPHRD_AX25:
282#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) 282#if IS_ENABLED(CONFIG_NETROM)
283 case ARPHRD_NETROM: 283 case ARPHRD_NETROM:
284#endif 284#endif
285 neigh->ops = &arp_broken_ops; 285 neigh->ops = &arp_broken_ops;
@@ -629,13 +629,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
629 arp->ar_pro = htons(ETH_P_IP); 629 arp->ar_pro = htons(ETH_P_IP);
630 break; 630 break;
631 631
632#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 632#if IS_ENABLED(CONFIG_AX25)
633 case ARPHRD_AX25: 633 case ARPHRD_AX25:
634 arp->ar_hrd = htons(ARPHRD_AX25); 634 arp->ar_hrd = htons(ARPHRD_AX25);
635 arp->ar_pro = htons(AX25_P_IP); 635 arp->ar_pro = htons(AX25_P_IP);
636 break; 636 break;
637 637
638#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE) 638#if IS_ENABLED(CONFIG_NETROM)
639 case ARPHRD_NETROM: 639 case ARPHRD_NETROM:
640 arp->ar_hrd = htons(ARPHRD_NETROM); 640 arp->ar_hrd = htons(ARPHRD_NETROM);
641 arp->ar_pro = htons(AX25_P_IP); 641 arp->ar_pro = htons(AX25_P_IP);
@@ -643,13 +643,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
643#endif 643#endif
644#endif 644#endif
645 645
646#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE) 646#if IS_ENABLED(CONFIG_FDDI)
647 case ARPHRD_FDDI: 647 case ARPHRD_FDDI:
648 arp->ar_hrd = htons(ARPHRD_ETHER); 648 arp->ar_hrd = htons(ARPHRD_ETHER);
649 arp->ar_pro = htons(ETH_P_IP); 649 arp->ar_pro = htons(ETH_P_IP);
650 break; 650 break;
651#endif 651#endif
652#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE) 652#if IS_ENABLED(CONFIG_TR)
653 case ARPHRD_IEEE802_TR: 653 case ARPHRD_IEEE802_TR:
654 arp->ar_hrd = htons(ARPHRD_IEEE802); 654 arp->ar_hrd = htons(ARPHRD_IEEE802);
655 arp->ar_pro = htons(ETH_P_IP); 655 arp->ar_pro = htons(ETH_P_IP);
@@ -1036,7 +1036,7 @@ static int arp_req_set(struct net *net, struct arpreq *r,
1036 return -EINVAL; 1036 return -EINVAL;
1037 } 1037 }
1038 switch (dev->type) { 1038 switch (dev->type) {
1039#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE) 1039#if IS_ENABLED(CONFIG_FDDI)
1040 case ARPHRD_FDDI: 1040 case ARPHRD_FDDI:
1041 /* 1041 /*
1042 * According to RFC 1390, FDDI devices should accept ARP 1042 * According to RFC 1390, FDDI devices should accept ARP
@@ -1282,7 +1282,7 @@ void __init arp_init(void)
1282} 1282}
1283 1283
1284#ifdef CONFIG_PROC_FS 1284#ifdef CONFIG_PROC_FS
1285#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 1285#if IS_ENABLED(CONFIG_AX25)
1286 1286
1287/* ------------------------------------------------------------------------ */ 1287/* ------------------------------------------------------------------------ */
1288/* 1288/*
@@ -1330,7 +1330,7 @@ static void arp_format_neigh_entry(struct seq_file *seq,
1330 1330
1331 read_lock(&n->lock); 1331 read_lock(&n->lock);
1332 /* Convert hardware address to XX:XX:XX:XX ... form. */ 1332 /* Convert hardware address to XX:XX:XX:XX ... form. */
1333#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 1333#if IS_ENABLED(CONFIG_AX25)
1334 if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM) 1334 if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM)
1335 ax2asc2((ax25_address *)n->ha, hbuffer); 1335 ax2asc2((ax25_address *)n->ha, hbuffer);
1336 else { 1336 else {
@@ -1343,7 +1343,7 @@ static void arp_format_neigh_entry(struct seq_file *seq,
1343 if (k != 0) 1343 if (k != 0)
1344 --k; 1344 --k;
1345 hbuffer[k] = 0; 1345 hbuffer[k] = 0;
1346#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) 1346#if IS_ENABLED(CONFIG_AX25)
1347 } 1347 }
1348#endif 1348#endif
1349 sprintf(tbuf, "%pI4", n->primary_key); 1349 sprintf(tbuf, "%pI4", n->primary_key);