diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-10-31 03:56:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-31 03:56:00 -0400 |
commit | 63779436ab4ad0867bcea53bf853b0004d7b895d (patch) | |
tree | bd4e49449eb852a54f62cc8bb1c807e26746dd43 /drivers/infiniband | |
parent | 21454aaad30651ba0dcc16fe5271bc12ee21f132 (diff) |
drivers: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u
can be replaced with %pI4
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 21 | ||||
-rw-r--r-- | drivers/infiniband/hw/nes/nes_utils.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_verbs.c | 8 |
3 files changed, 15 insertions, 19 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 6058d05e975d..2854a6f7fdfe 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -823,8 +823,8 @@ static struct nes_cm_node *find_node(struct nes_cm_core *cm_core, | |||
823 | /* get a handle on the hte */ | 823 | /* get a handle on the hte */ |
824 | hte = &cm_core->connected_nodes; | 824 | hte = &cm_core->connected_nodes; |
825 | 825 | ||
826 | nes_debug(NES_DBG_CM, "Searching for an owner node: " NIPQUAD_FMT ":%x from core %p->%p\n", | 826 | nes_debug(NES_DBG_CM, "Searching for an owner node: %pI4:%x from core %p->%p\n", |
827 | HIPQUAD(loc_addr), loc_port, cm_core, hte); | 827 | &loc_addr, loc_port, cm_core, hte); |
828 | 828 | ||
829 | /* walk list and find cm_node associated with this session ID */ | 829 | /* walk list and find cm_node associated with this session ID */ |
830 | spin_lock_irqsave(&cm_core->ht_lock, flags); | 830 | spin_lock_irqsave(&cm_core->ht_lock, flags); |
@@ -873,8 +873,8 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core, | |||
873 | } | 873 | } |
874 | spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); | 874 | spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); |
875 | 875 | ||
876 | nes_debug(NES_DBG_CM, "Unable to find listener for " NIPQUAD_FMT ":%x\n", | 876 | nes_debug(NES_DBG_CM, "Unable to find listener for %pI4:%x\n", |
877 | HIPQUAD(dst_addr), dst_port); | 877 | &dst_addr, dst_port); |
878 | 878 | ||
879 | /* no listener */ | 879 | /* no listener */ |
880 | return NULL; | 880 | return NULL; |
@@ -1082,10 +1082,9 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, | |||
1082 | cm_node->loc_port = cm_info->loc_port; | 1082 | cm_node->loc_port = cm_info->loc_port; |
1083 | cm_node->rem_port = cm_info->rem_port; | 1083 | cm_node->rem_port = cm_info->rem_port; |
1084 | cm_node->send_write0 = send_first; | 1084 | cm_node->send_write0 = send_first; |
1085 | nes_debug(NES_DBG_CM, "Make node addresses : loc = " NIPQUAD_FMT | 1085 | nes_debug(NES_DBG_CM, "Make node addresses : loc = %pI4:%x, rem = %pI4:%x\n", |
1086 | ":%x, rem = " NIPQUAD_FMT ":%x\n", | 1086 | &cm_node->loc_addr, cm_node->loc_port, |
1087 | HIPQUAD(cm_node->loc_addr), cm_node->loc_port, | 1087 | &cm_node->rem_addr, cm_node->rem_port); |
1088 | HIPQUAD(cm_node->rem_addr), cm_node->rem_port); | ||
1089 | cm_node->listener = listener; | 1088 | cm_node->listener = listener; |
1090 | cm_node->netdev = nesvnic->netdev; | 1089 | cm_node->netdev = nesvnic->netdev; |
1091 | cm_node->cm_id = cm_info->cm_id; | 1090 | cm_node->cm_id = cm_info->cm_id; |
@@ -2066,10 +2065,8 @@ static void mini_cm_recv_pkt(struct nes_cm_core *cm_core, | |||
2066 | nfo.rem_addr = ntohl(iph->saddr); | 2065 | nfo.rem_addr = ntohl(iph->saddr); |
2067 | nfo.rem_port = ntohs(tcph->source); | 2066 | nfo.rem_port = ntohs(tcph->source); |
2068 | 2067 | ||
2069 | nes_debug(NES_DBG_CM, "Received packet: dest=" NIPQUAD_FMT | 2068 | nes_debug(NES_DBG_CM, "Received packet: dest=%pI4:0x%04X src=%pI4:0x%04X\n", |
2070 | ":0x%04X src=" NIPQUAD_FMT ":0x%04X\n", | 2069 | &iph->daddr, tcph->dest, &iph->saddr, tcph->source); |
2071 | NIPQUAD(iph->daddr), tcph->dest, | ||
2072 | NIPQUAD(iph->saddr), tcph->source); | ||
2073 | 2070 | ||
2074 | do { | 2071 | do { |
2075 | cm_node = find_node(cm_core, | 2072 | cm_node = find_node(cm_core, |
diff --git a/drivers/infiniband/hw/nes/nes_utils.c b/drivers/infiniband/hw/nes/nes_utils.c index fb8cbd71a2ef..9f16f7a89efc 100644 --- a/drivers/infiniband/hw/nes/nes_utils.c +++ b/drivers/infiniband/hw/nes/nes_utils.c | |||
@@ -679,9 +679,8 @@ int nes_arp_table(struct nes_device *nesdev, u32 ip_addr, u8 *mac_addr, u32 acti | |||
679 | 679 | ||
680 | /* DELETE or RESOLVE */ | 680 | /* DELETE or RESOLVE */ |
681 | if (arp_index == nesadapter->arp_table_size) { | 681 | if (arp_index == nesadapter->arp_table_size) { |
682 | nes_debug(NES_DBG_NETDEV, "MAC for " NIPQUAD_FMT " not in ARP table - cannot %s\n", | 682 | nes_debug(NES_DBG_NETDEV, "MAC for %pI4 not in ARP table - cannot %s\n", |
683 | HIPQUAD(ip_addr), | 683 | &ip_addr, action == NES_ARP_RESOLVE ? "resolve" : "delete"); |
684 | action == NES_ARP_RESOLVE ? "resolve" : "delete"); | ||
685 | return -1; | 684 | return -1; |
686 | } | 685 | } |
687 | 686 | ||
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 26ff6214a81f..e418b960e334 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c | |||
@@ -515,14 +515,14 @@ int iser_connect(struct iser_conn *ib_conn, | |||
515 | struct sockaddr *src, *dst; | 515 | struct sockaddr *src, *dst; |
516 | int err = 0; | 516 | int err = 0; |
517 | 517 | ||
518 | sprintf(ib_conn->name,"%d.%d.%d.%d:%d", | 518 | sprintf(ib_conn->name, "%pI4:%d", |
519 | NIPQUAD(dst_addr->sin_addr.s_addr), dst_addr->sin_port); | 519 | &dst_addr->sin_addr.s_addr, dst_addr->sin_port); |
520 | 520 | ||
521 | /* the device is known only --after-- address resolution */ | 521 | /* the device is known only --after-- address resolution */ |
522 | ib_conn->device = NULL; | 522 | ib_conn->device = NULL; |
523 | 523 | ||
524 | iser_err("connecting to: %d.%d.%d.%d, port 0x%x\n", | 524 | iser_err("connecting to: %pI4, port 0x%x\n", |
525 | NIPQUAD(dst_addr->sin_addr), dst_addr->sin_port); | 525 | &dst_addr->sin_addr, dst_addr->sin_port); |
526 | 526 | ||
527 | ib_conn->state = ISER_CONN_PENDING; | 527 | ib_conn->state = ISER_CONN_PENDING; |
528 | 528 | ||