aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-10-31 03:54:56 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-31 03:54:56 -0400
commit21454aaad30651ba0dcc16fe5271bc12ee21f132 (patch)
treeeb525494d6f80a0e855840bc588ae1f422348b04 /net
parent14d5e834f6b36667c7da56374645f99b6cf30814 (diff)
net: replace NIPQUAD() in net/*/
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 'net')
-rw-r--r--net/atm/clip.c4
-rw-r--r--net/atm/mpc.c26
-rw-r--r--net/atm/mpoa_caches.c18
-rw-r--r--net/bridge/netfilter/ebt_log.c12
-rw-r--r--net/dccp/ipv4.c8
-rw-r--r--net/dccp/probe.c12
-rw-r--r--net/netlabel/netlabel_addrlist.c2
-rw-r--r--net/rxrpc/af_rxrpc.c4
-rw-r--r--net/rxrpc/ar-error.c3
-rw-r--r--net/rxrpc/ar-local.c16
-rw-r--r--net/rxrpc/ar-peer.c8
-rw-r--r--net/rxrpc/ar-proc.c16
-rw-r--r--net/rxrpc/ar-transport.c12
-rw-r--r--net/rxrpc/rxkad.c2
-rw-r--r--net/sctp/protocol.c18
-rw-r--r--net/sctp/sm_statefuns.c5
-rw-r--r--net/sunrpc/clnt.c4
-rw-r--r--net/sunrpc/rpcb_clnt.c11
-rw-r--r--net/sunrpc/svcauth_unix.c17
-rw-r--r--net/sunrpc/svcsock.c6
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_transport.c12
-rw-r--r--net/sunrpc/xprtrdma/transport.c14
-rw-r--r--net/sunrpc/xprtrdma/verbs.c14
-rw-r--r--net/sunrpc/xprtsock.c15
-rw-r--r--net/xfrm/xfrm_policy.c6
-rw-r--r--net/xfrm/xfrm_state.c12
26 files changed, 127 insertions, 150 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 5b5b96344ce6..2d33a83be799 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -822,8 +822,8 @@ static void atmarp_info(struct seq_file *seq, struct net_device *dev,
822 seq_printf(seq, "%-6s%-4s%-4s%5ld ", 822 seq_printf(seq, "%-6s%-4s%-4s%5ld ",
823 dev->name, svc ? "SVC" : "PVC", llc ? "LLC" : "NULL", exp); 823 dev->name, svc ? "SVC" : "PVC", llc ? "LLC" : "NULL", exp);
824 824
825 off = scnprintf(buf, sizeof(buf) - 1, "%d.%d.%d.%d", 825 off = scnprintf(buf, sizeof(buf) - 1, "%pI4",
826 NIPQUAD(entry->ip)); 826 &entry->ip);
827 while (off < 16) 827 while (off < 16)
828 buf[off++] = ' '; 828 buf[off++] = ' ';
829 buf[off] = '\0'; 829 buf[off] = '\0';
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 11b16d16661c..010b1d2a5a8f 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -232,8 +232,8 @@ void atm_mpoa_disp_qos(struct seq_file *m)
232 seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); 232 seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n");
233 233
234 while (qos != NULL) { 234 while (qos != NULL) {
235 seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", 235 seq_printf(m, "%pI4\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n",
236 NIPQUAD(qos->ipaddr), 236 &qos->ipaddr,
237 qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, 237 qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu,
238 qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); 238 qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu);
239 qos = qos->next; 239 qos = qos->next;
@@ -595,8 +595,8 @@ static int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg)
595 if (in_entry != NULL) mpc->in_ops->put(in_entry); 595 if (in_entry != NULL) mpc->in_ops->put(in_entry);
596 return -EINVAL; 596 return -EINVAL;
597 } 597 }
598 printk("mpoa: (%s) mpc_vcc_attach: attaching ingress SVC, entry = %u.%u.%u.%u\n", 598 printk("mpoa: (%s) mpc_vcc_attach: attaching ingress SVC, entry = %pI4\n",
599 mpc->dev->name, NIPQUAD(in_entry->ctrl_info.in_dst_ip)); 599 mpc->dev->name, &in_entry->ctrl_info.in_dst_ip);
600 in_entry->shortcut = vcc; 600 in_entry->shortcut = vcc;
601 mpc->in_ops->put(in_entry); 601 mpc->in_ops->put(in_entry);
602 } else { 602 } else {
@@ -627,8 +627,8 @@ static void mpc_vcc_close(struct atm_vcc *vcc, struct net_device *dev)
627 dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name); 627 dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name);
628 in_entry = mpc->in_ops->get_by_vcc(vcc, mpc); 628 in_entry = mpc->in_ops->get_by_vcc(vcc, mpc);
629 if (in_entry) { 629 if (in_entry) {
630 dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %u.%u.%u.%u\n", 630 dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %pI4\n",
631 mpc->dev->name, NIPQUAD(in_entry->ctrl_info.in_dst_ip)); 631 mpc->dev->name, &in_entry->ctrl_info.in_dst_ip);
632 in_entry->shortcut = NULL; 632 in_entry->shortcut = NULL;
633 mpc->in_ops->put(in_entry); 633 mpc->in_ops->put(in_entry);
634 } 634 }
@@ -1098,7 +1098,8 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien
1098 entry->shortcut = eg_entry->shortcut; 1098 entry->shortcut = eg_entry->shortcut;
1099 } 1099 }
1100 if(entry->shortcut){ 1100 if(entry->shortcut){
1101 dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip)); 1101 dprintk("mpoa: (%s) using egress SVC to reach %pI4\n",
1102 client->dev->name, &dst_ip);
1102 client->eg_ops->put(eg_entry); 1103 client->eg_ops->put(eg_entry);
1103 return; 1104 return;
1104 } 1105 }
@@ -1123,7 +1124,8 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1123 __be32 dst_ip = msg->content.in_info.in_dst_ip; 1124 __be32 dst_ip = msg->content.in_info.in_dst_ip;
1124 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); 1125 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc);
1125 1126
1126 dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(dst_ip)); 1127 dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %pI4\n",
1128 mpc->dev->name, &dst_ip);
1127 ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); 1129 ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry);
1128 if(entry == NULL){ 1130 if(entry == NULL){
1129 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); 1131 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name);
@@ -1171,14 +1173,14 @@ static void ingress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1171 in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); 1173 in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask);
1172 1174
1173 if(entry == NULL){ 1175 if(entry == NULL){
1174 printk("mpoa: (%s) ingress_purge_rcvd: purge for a non-existing entry, ", mpc->dev->name); 1176 printk("mpoa: (%s) ingress_purge_rcvd: purge for a non-existing entry, ip = %pI4\n",
1175 printk("ip = %u.%u.%u.%u\n", NIPQUAD(dst_ip)); 1177 mpc->dev->name, &dst_ip);
1176 return; 1178 return;
1177 } 1179 }
1178 1180
1179 do { 1181 do {
1180 dprintk("mpoa: (%s) ingress_purge_rcvd: removing an ingress entry, ip = %u.%u.%u.%u\n" , 1182 dprintk("mpoa: (%s) ingress_purge_rcvd: removing an ingress entry, ip = %pI4\n",
1181 mpc->dev->name, NIPQUAD(dst_ip)); 1183 mpc->dev->name, &dst_ip);
1182 write_lock_bh(&mpc->ingress_lock); 1184 write_lock_bh(&mpc->ingress_lock);
1183 mpc->in_ops->remove_entry(entry, mpc); 1185 mpc->in_ops->remove_entry(entry, mpc);
1184 write_unlock_bh(&mpc->ingress_lock); 1186 write_unlock_bh(&mpc->ingress_lock);
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
index 24799e3e78f7..4504a4b339bb 100644
--- a/net/atm/mpoa_caches.c
+++ b/net/atm/mpoa_caches.c
@@ -94,7 +94,7 @@ static in_cache_entry *in_cache_add_entry(__be32 dst_ip,
94 return NULL; 94 return NULL;
95 } 95 }
96 96
97 dprintk("mpoa: mpoa_caches.c: adding an ingress entry, ip = %u.%u.%u.%u\n", NIPQUAD(dst_ip)); 97 dprintk("mpoa: mpoa_caches.c: adding an ingress entry, ip = %pI4\n", &dst_ip);
98 98
99 atomic_set(&entry->use, 1); 99 atomic_set(&entry->use, 1);
100 dprintk("mpoa: mpoa_caches.c: new_in_cache_entry: about to lock\n"); 100 dprintk("mpoa: mpoa_caches.c: new_in_cache_entry: about to lock\n");
@@ -150,7 +150,8 @@ static int cache_hit(in_cache_entry *entry, struct mpoa_client *mpc)
150 150
151 if( entry->count > mpc->parameters.mpc_p1 && 151 if( entry->count > mpc->parameters.mpc_p1 &&
152 entry->entry_state == INGRESS_INVALID){ 152 entry->entry_state == INGRESS_INVALID){
153 dprintk("mpoa: (%s) mpoa_caches.c: threshold exceeded for ip %u.%u.%u.%u, sending MPOA res req\n", mpc->dev->name, NIPQUAD(entry->ctrl_info.in_dst_ip)); 153 dprintk("mpoa: (%s) mpoa_caches.c: threshold exceeded for ip %pI4, sending MPOA res req\n",
154 mpc->dev->name, &entry->ctrl_info.in_dst_ip);
154 entry->entry_state = INGRESS_RESOLVING; 155 entry->entry_state = INGRESS_RESOLVING;
155 msg.type = SND_MPOA_RES_RQST; 156 msg.type = SND_MPOA_RES_RQST;
156 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN ); 157 memcpy(msg.MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN );
@@ -184,7 +185,8 @@ static void in_cache_remove_entry(in_cache_entry *entry,
184 struct k_message msg; 185 struct k_message msg;
185 186
186 vcc = entry->shortcut; 187 vcc = entry->shortcut;
187 dprintk("mpoa: mpoa_caches.c: removing an ingress entry, ip = %u.%u.%u.%u\n",NIPQUAD(entry->ctrl_info.in_dst_ip)); 188 dprintk("mpoa: mpoa_caches.c: removing an ingress entry, ip = %pI4\n",
189 &entry->ctrl_info.in_dst_ip);
188 190
189 if (entry->prev != NULL) 191 if (entry->prev != NULL)
190 entry->prev->next = entry->next; 192 entry->prev->next = entry->next;
@@ -228,7 +230,8 @@ static void clear_count_and_expired(struct mpoa_client *client)
228 next_entry = entry->next; 230 next_entry = entry->next;
229 if((now.tv_sec - entry->tv.tv_sec) 231 if((now.tv_sec - entry->tv.tv_sec)
230 > entry->ctrl_info.holding_time){ 232 > entry->ctrl_info.holding_time){
231 dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %u.%u.%u.%u\n", NIPQUAD(entry->ctrl_info.in_dst_ip)); 233 dprintk("mpoa: mpoa_caches.c: holding time expired, ip = %pI4\n",
234 &entry->ctrl_info.in_dst_ip);
232 client->in_ops->remove_entry(entry, client); 235 client->in_ops->remove_entry(entry, client);
233 } 236 }
234 entry = next_entry; 237 entry = next_entry;
@@ -453,7 +456,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli
453 return NULL; 456 return NULL;
454 } 457 }
455 458
456 dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %u.%u.%u.%u, this should be our IP\n", NIPQUAD(msg->content.eg_info.eg_dst_ip)); 459 dprintk("mpoa: mpoa_caches.c: adding an egress entry, ip = %pI4, this should be our IP\n",
460 &msg->content.eg_info.eg_dst_ip);
457 461
458 atomic_set(&entry->use, 1); 462 atomic_set(&entry->use, 1);
459 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry: about to lock\n"); 463 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry: about to lock\n");
@@ -469,8 +473,8 @@ static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, struct mpoa_cli
469 do_gettimeofday(&(entry->tv)); 473 do_gettimeofday(&(entry->tv));
470 entry->entry_state = EGRESS_RESOLVED; 474 entry->entry_state = EGRESS_RESOLVED;
471 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id)); 475 dprintk("mpoa: mpoa_caches.c: new_eg_cache_entry cache_id %lu\n", ntohl(entry->ctrl_info.cache_id));
472 dprintk("mpoa: mpoa_caches.c: mps_ip = %u.%u.%u.%u\n", 476 dprintk("mpoa: mpoa_caches.c: mps_ip = %pI4\n",
473 NIPQUAD(entry->ctrl_info.mps_ip)); 477 &entry->ctrl_info.mps_ip);
474 atomic_inc(&entry->use); 478 atomic_inc(&entry->use);
475 479
476 write_unlock_irq(&client->egress_lock); 480 write_unlock_irq(&client->egress_lock);
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 5e7cff3542f2..d44cbf8c374a 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -79,7 +79,6 @@ print_ports(const struct sk_buff *skb, uint8_t protocol, int offset)
79 } 79 }
80} 80}
81 81
82#define myNIPQUAD(a) a[0], a[1], a[2], a[3]
83static void 82static void
84ebt_log_packet(u_int8_t pf, unsigned int hooknum, 83ebt_log_packet(u_int8_t pf, unsigned int hooknum,
85 const struct sk_buff *skb, const struct net_device *in, 84 const struct sk_buff *skb, const struct net_device *in,
@@ -113,9 +112,8 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
113 printk(" INCOMPLETE IP header"); 112 printk(" INCOMPLETE IP header");
114 goto out; 113 goto out;
115 } 114 }
116 printk(" IP SRC=%u.%u.%u.%u IP DST=%u.%u.%u.%u, IP " 115 printk(" IP SRC=%pI4 IP DST=%pI4, IP tos=0x%02X, IP proto=%d",
117 "tos=0x%02X, IP proto=%d", NIPQUAD(ih->saddr), 116 &ih->saddr, &ih->daddr, ih->tos, ih->protocol);
118 NIPQUAD(ih->daddr), ih->tos, ih->protocol);
119 print_ports(skb, ih->protocol, ih->ihl*4); 117 print_ports(skb, ih->protocol, ih->ihl*4);
120 goto out; 118 goto out;
121 } 119 }
@@ -175,12 +173,10 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
175 } 173 }
176 printk(" ARP MAC SRC="); 174 printk(" ARP MAC SRC=");
177 print_MAC(ap->mac_src); 175 print_MAC(ap->mac_src);
178 printk(" ARP IP SRC=%u.%u.%u.%u", 176 printk(" ARP IP SRC=%pI4", ap->ip_src);
179 myNIPQUAD(ap->ip_src));
180 printk(" ARP MAC DST="); 177 printk(" ARP MAC DST=");
181 print_MAC(ap->mac_dst); 178 print_MAC(ap->mac_dst);
182 printk(" ARP IP DST=%u.%u.%u.%u", 179 printk(" ARP IP DST=%pI4", ap->ip_dst);
183 myNIPQUAD(ap->ip_dst));
184 } 180 }
185 } 181 }
186out: 182out:
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index e3dfddab21cc..01e3e0206254 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -792,12 +792,10 @@ static int dccp_v4_rcv(struct sk_buff *skb)
792 DCCP_SKB_CB(skb)->dccpd_seq = dccp_hdr_seq(dh); 792 DCCP_SKB_CB(skb)->dccpd_seq = dccp_hdr_seq(dh);
793 DCCP_SKB_CB(skb)->dccpd_type = dh->dccph_type; 793 DCCP_SKB_CB(skb)->dccpd_type = dh->dccph_type;
794 794
795 dccp_pr_debug("%8.8s " 795 dccp_pr_debug("%8.8s src=%pI4@%-5d dst=%pI4@%-5d seq=%llu",
796 "src=%u.%u.%u.%u@%-5d "
797 "dst=%u.%u.%u.%u@%-5d seq=%llu",
798 dccp_packet_name(dh->dccph_type), 796 dccp_packet_name(dh->dccph_type),
799 NIPQUAD(iph->saddr), ntohs(dh->dccph_sport), 797 &iph->saddr, ntohs(dh->dccph_sport),
800 NIPQUAD(iph->daddr), ntohs(dh->dccph_dport), 798 &iph->daddr, ntohs(dh->dccph_dport),
801 (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq); 799 (unsigned long long) DCCP_SKB_CB(skb)->dccpd_seq);
802 800
803 if (dccp_packet_without_ack(skb)) { 801 if (dccp_packet_without_ack(skb)) {
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 81368a7f5379..49ba8d5ec4b5 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -86,18 +86,18 @@ static int jdccp_sendmsg(struct kiocb *iocb, struct sock *sk,
86 if (port == 0 || ntohs(inet->dport) == port || 86 if (port == 0 || ntohs(inet->dport) == port ||
87 ntohs(inet->sport) == port) { 87 ntohs(inet->sport) == port) {
88 if (hctx) 88 if (hctx)
89 printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d %d %d %d %u " 89 printl("%pI4:%u %pI4:%u %d %d %d %d %u "
90 "%llu %llu %d\n", 90 "%llu %llu %d\n",
91 NIPQUAD(inet->saddr), ntohs(inet->sport), 91 &inet->saddr, ntohs(inet->sport),
92 NIPQUAD(inet->daddr), ntohs(inet->dport), size, 92 &inet->daddr, ntohs(inet->dport), size,
93 hctx->ccid3hctx_s, hctx->ccid3hctx_rtt, 93 hctx->ccid3hctx_s, hctx->ccid3hctx_rtt,
94 hctx->ccid3hctx_p, hctx->ccid3hctx_x_calc, 94 hctx->ccid3hctx_p, hctx->ccid3hctx_x_calc,
95 hctx->ccid3hctx_x_recv >> 6, 95 hctx->ccid3hctx_x_recv >> 6,
96 hctx->ccid3hctx_x >> 6, hctx->ccid3hctx_t_ipi); 96 hctx->ccid3hctx_x >> 6, hctx->ccid3hctx_t_ipi);
97 else 97 else
98 printl("%d.%d.%d.%d:%u %d.%d.%d.%d:%u %d\n", 98 printl("%pI4:%u %pI4:%u %d\n",
99 NIPQUAD(inet->saddr), ntohs(inet->sport), 99 &inet->saddr, ntohs(inet->sport),
100 NIPQUAD(inet->daddr), ntohs(inet->dport), size); 100 &inet->daddr, ntohs(inet->dport), size);
101 } 101 }
102 102
103 jprobe_return(); 103 jprobe_return();
diff --git a/net/netlabel/netlabel_addrlist.c b/net/netlabel/netlabel_addrlist.c
index 2fc49e56c5a7..834c6eb7f484 100644
--- a/net/netlabel/netlabel_addrlist.c
+++ b/net/netlabel/netlabel_addrlist.c
@@ -337,7 +337,7 @@ void netlbl_af4list_audit_addr(struct audit_buffer *audit_buf,
337 337
338 if (dev != NULL) 338 if (dev != NULL)
339 audit_log_format(audit_buf, " netif=%s", dev); 339 audit_log_format(audit_buf, " netif=%s", dev);
340 audit_log_format(audit_buf, " %s=" NIPQUAD_FMT, dir, NIPQUAD(addr)); 340 audit_log_format(audit_buf, " %s=%pI4", dir, &addr);
341 if (mask_val != 0xffffffff) { 341 if (mask_val != 0xffffffff) {
342 u32 mask_len = 0; 342 u32 mask_len = 0;
343 while (mask_val > 0) { 343 while (mask_val > 0) {
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 32e489118beb..d7d2bed7a699 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -96,9 +96,9 @@ static int rxrpc_validate_address(struct rxrpc_sock *rx,
96 96
97 switch (srx->transport.family) { 97 switch (srx->transport.family) {
98 case AF_INET: 98 case AF_INET:
99 _debug("INET: %x @ %u.%u.%u.%u", 99 _debug("INET: %x @ %pI4",
100 ntohs(srx->transport.sin.sin_port), 100 ntohs(srx->transport.sin.sin_port),
101 NIPQUAD(srx->transport.sin.sin_addr)); 101 &srx->transport.sin.sin_addr);
102 if (srx->transport_len > 8) 102 if (srx->transport_len > 8)
103 memset((void *)&srx->transport + 8, 0, 103 memset((void *)&srx->transport + 8, 0,
104 srx->transport_len - 8); 104 srx->transport_len - 8);
diff --git a/net/rxrpc/ar-error.c b/net/rxrpc/ar-error.c
index 6cb3e8890e7e..d4d1ae26d293 100644
--- a/net/rxrpc/ar-error.c
+++ b/net/rxrpc/ar-error.c
@@ -49,8 +49,7 @@ void rxrpc_UDP_error_report(struct sock *sk)
49 addr = *(__be32 *)(skb_network_header(skb) + serr->addr_offset); 49 addr = *(__be32 *)(skb_network_header(skb) + serr->addr_offset);
50 port = serr->port; 50 port = serr->port;
51 51
52 _net("Rx UDP Error from "NIPQUAD_FMT":%hu", 52 _net("Rx UDP Error from %pI4:%hu", &addr, ntohs(port));
53 NIPQUAD(addr), ntohs(port));
54 _debug("Msg l:%d d:%d", skb->len, skb->data_len); 53 _debug("Msg l:%d d:%d", skb->len, skb->data_len);
55 54
56 peer = rxrpc_find_peer(local, addr, port); 55 peer = rxrpc_find_peer(local, addr, port);
diff --git a/net/rxrpc/ar-local.c b/net/rxrpc/ar-local.c
index f3a2bd747a8f..807535ff29b5 100644
--- a/net/rxrpc/ar-local.c
+++ b/net/rxrpc/ar-local.c
@@ -131,10 +131,10 @@ struct rxrpc_local *rxrpc_lookup_local(struct sockaddr_rxrpc *srx)
131 struct rxrpc_local *local; 131 struct rxrpc_local *local;
132 int ret; 132 int ret;
133 133
134 _enter("{%d,%u,%u.%u.%u.%u+%hu}", 134 _enter("{%d,%u,%pI4+%hu}",
135 srx->transport_type, 135 srx->transport_type,
136 srx->transport.family, 136 srx->transport.family,
137 NIPQUAD(srx->transport.sin.sin_addr), 137 &srx->transport.sin.sin_addr,
138 ntohs(srx->transport.sin.sin_port)); 138 ntohs(srx->transport.sin.sin_port));
139 139
140 down_write(&rxrpc_local_sem); 140 down_write(&rxrpc_local_sem);
@@ -143,10 +143,10 @@ struct rxrpc_local *rxrpc_lookup_local(struct sockaddr_rxrpc *srx)
143 read_lock_bh(&rxrpc_local_lock); 143 read_lock_bh(&rxrpc_local_lock);
144 144
145 list_for_each_entry(local, &rxrpc_locals, link) { 145 list_for_each_entry(local, &rxrpc_locals, link) {
146 _debug("CMP {%d,%u,%u.%u.%u.%u+%hu}", 146 _debug("CMP {%d,%u,%pI4+%hu}",
147 local->srx.transport_type, 147 local->srx.transport_type,
148 local->srx.transport.family, 148 local->srx.transport.family,
149 NIPQUAD(local->srx.transport.sin.sin_addr), 149 &local->srx.transport.sin.sin_addr,
150 ntohs(local->srx.transport.sin.sin_port)); 150 ntohs(local->srx.transport.sin.sin_port));
151 151
152 if (local->srx.transport_type != srx->transport_type || 152 if (local->srx.transport_type != srx->transport_type ||
@@ -188,11 +188,11 @@ struct rxrpc_local *rxrpc_lookup_local(struct sockaddr_rxrpc *srx)
188 188
189 up_write(&rxrpc_local_sem); 189 up_write(&rxrpc_local_sem);
190 190
191 _net("LOCAL new %d {%d,%u,%u.%u.%u.%u+%hu}", 191 _net("LOCAL new %d {%d,%u,%pI4+%hu}",
192 local->debug_id, 192 local->debug_id,
193 local->srx.transport_type, 193 local->srx.transport_type,
194 local->srx.transport.family, 194 local->srx.transport.family,
195 NIPQUAD(local->srx.transport.sin.sin_addr), 195 &local->srx.transport.sin.sin_addr,
196 ntohs(local->srx.transport.sin.sin_port)); 196 ntohs(local->srx.transport.sin.sin_port));
197 197
198 _leave(" = %p [new]", local); 198 _leave(" = %p [new]", local);
@@ -203,11 +203,11 @@ found_local:
203 read_unlock_bh(&rxrpc_local_lock); 203 read_unlock_bh(&rxrpc_local_lock);
204 up_write(&rxrpc_local_sem); 204 up_write(&rxrpc_local_sem);
205 205
206 _net("LOCAL old %d {%d,%u,%u.%u.%u.%u+%hu}", 206 _net("LOCAL old %d {%d,%u,%pI4+%hu}",
207 local->debug_id, 207 local->debug_id,
208 local->srx.transport_type, 208 local->srx.transport_type,
209 local->srx.transport.family, 209 local->srx.transport.family,
210 NIPQUAD(local->srx.transport.sin.sin_addr), 210 &local->srx.transport.sin.sin_addr,
211 ntohs(local->srx.transport.sin.sin_port)); 211 ntohs(local->srx.transport.sin.sin_port));
212 212
213 _leave(" = %p [reuse]", local); 213 _leave(" = %p [reuse]", local);
diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c
index 2abe2081a5e8..edc026c1eb76 100644
--- a/net/rxrpc/ar-peer.c
+++ b/net/rxrpc/ar-peer.c
@@ -123,10 +123,10 @@ struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *srx, gfp_t gfp)
123 const char *new = "old"; 123 const char *new = "old";
124 int usage; 124 int usage;
125 125
126 _enter("{%d,%d,%u.%u.%u.%u+%hu}", 126 _enter("{%d,%d,%pI4+%hu}",
127 srx->transport_type, 127 srx->transport_type,
128 srx->transport_len, 128 srx->transport_len,
129 NIPQUAD(srx->transport.sin.sin_addr), 129 &srx->transport.sin.sin_addr,
130 ntohs(srx->transport.sin.sin_port)); 130 ntohs(srx->transport.sin.sin_port));
131 131
132 /* search the peer list first */ 132 /* search the peer list first */
@@ -177,12 +177,12 @@ struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *srx, gfp_t gfp)
177 new = "new"; 177 new = "new";
178 178
179success: 179success:
180 _net("PEER %s %d {%d,%u,%u.%u.%u.%u+%hu}", 180 _net("PEER %s %d {%d,%u,%pI4+%hu}",
181 new, 181 new,
182 peer->debug_id, 182 peer->debug_id,
183 peer->srx.transport_type, 183 peer->srx.transport_type,
184 peer->srx.transport.family, 184 peer->srx.transport.family,
185 NIPQUAD(peer->srx.transport.sin.sin_addr), 185 &peer->srx.transport.sin.sin_addr,
186 ntohs(peer->srx.transport.sin.sin_port)); 186 ntohs(peer->srx.transport.sin.sin_port));
187 187
188 _leave(" = %p {u=%d}", peer, atomic_read(&peer->usage)); 188 _leave(" = %p {u=%d}", peer, atomic_read(&peer->usage));
diff --git a/net/rxrpc/ar-proc.c b/net/rxrpc/ar-proc.c
index 017322e2786d..38047f713f2c 100644
--- a/net/rxrpc/ar-proc.c
+++ b/net/rxrpc/ar-proc.c
@@ -61,12 +61,12 @@ static int rxrpc_call_seq_show(struct seq_file *seq, void *v)
61 call = list_entry(v, struct rxrpc_call, link); 61 call = list_entry(v, struct rxrpc_call, link);
62 trans = call->conn->trans; 62 trans = call->conn->trans;
63 63
64 sprintf(lbuff, NIPQUAD_FMT":%u", 64 sprintf(lbuff, "%pI4:%u",
65 NIPQUAD(trans->local->srx.transport.sin.sin_addr), 65 &trans->local->srx.transport.sin.sin_addr,
66 ntohs(trans->local->srx.transport.sin.sin_port)); 66 ntohs(trans->local->srx.transport.sin.sin_port));
67 67
68 sprintf(rbuff, NIPQUAD_FMT":%u", 68 sprintf(rbuff, "%pI4:%u",
69 NIPQUAD(trans->peer->srx.transport.sin.sin_addr), 69 &trans->peer->srx.transport.sin.sin_addr,
70 ntohs(trans->peer->srx.transport.sin.sin_port)); 70 ntohs(trans->peer->srx.transport.sin.sin_port));
71 71
72 seq_printf(seq, 72 seq_printf(seq,
@@ -144,12 +144,12 @@ static int rxrpc_connection_seq_show(struct seq_file *seq, void *v)
144 conn = list_entry(v, struct rxrpc_connection, link); 144 conn = list_entry(v, struct rxrpc_connection, link);
145 trans = conn->trans; 145 trans = conn->trans;
146 146
147 sprintf(lbuff, NIPQUAD_FMT":%u", 147 sprintf(lbuff, "%pI4:%u",
148 NIPQUAD(trans->local->srx.transport.sin.sin_addr), 148 &trans->local->srx.transport.sin.sin_addr,
149 ntohs(trans->local->srx.transport.sin.sin_port)); 149 ntohs(trans->local->srx.transport.sin.sin_port));
150 150
151 sprintf(rbuff, NIPQUAD_FMT":%u", 151 sprintf(rbuff, "%pI4:%u",
152 NIPQUAD(trans->peer->srx.transport.sin.sin_addr), 152 &trans->peer->srx.transport.sin.sin_addr,
153 ntohs(trans->peer->srx.transport.sin.sin_port)); 153 ntohs(trans->peer->srx.transport.sin.sin_port));
154 154
155 seq_printf(seq, 155 seq_printf(seq,
diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/ar-transport.c
index 64069c8769a5..0936e1acc30e 100644
--- a/net/rxrpc/ar-transport.c
+++ b/net/rxrpc/ar-transport.c
@@ -78,10 +78,10 @@ struct rxrpc_transport *rxrpc_get_transport(struct rxrpc_local *local,
78 const char *new = "old"; 78 const char *new = "old";
79 int usage; 79 int usage;
80 80
81 _enter("{%u.%u.%u.%u+%hu},{%u.%u.%u.%u+%hu},", 81 _enter("{%pI4+%hu},{%pI4+%hu},",
82 NIPQUAD(local->srx.transport.sin.sin_addr), 82 &local->srx.transport.sin.sin_addr,
83 ntohs(local->srx.transport.sin.sin_port), 83 ntohs(local->srx.transport.sin.sin_port),
84 NIPQUAD(peer->srx.transport.sin.sin_addr), 84 &peer->srx.transport.sin.sin_addr,
85 ntohs(peer->srx.transport.sin.sin_port)); 85 ntohs(peer->srx.transport.sin.sin_port));
86 86
87 /* search the transport list first */ 87 /* search the transport list first */
@@ -149,10 +149,10 @@ struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *local,
149{ 149{
150 struct rxrpc_transport *trans; 150 struct rxrpc_transport *trans;
151 151
152 _enter("{%u.%u.%u.%u+%hu},{%u.%u.%u.%u+%hu},", 152 _enter("{%pI4+%hu},{%pI4+%hu},",
153 NIPQUAD(local->srx.transport.sin.sin_addr), 153 &local->srx.transport.sin.sin_addr,
154 ntohs(local->srx.transport.sin.sin_port), 154 ntohs(local->srx.transport.sin.sin_port),
155 NIPQUAD(peer->srx.transport.sin.sin_addr), 155 &peer->srx.transport.sin.sin_addr,
156 ntohs(peer->srx.transport.sin.sin_port)); 156 ntohs(peer->srx.transport.sin.sin_port));
157 157
158 /* search the transport list */ 158 /* search the transport list */
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index ba3f6e49fddc..ef8f91030a15 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -897,7 +897,7 @@ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn,
897 /* get the IPv4 address of the entity that requested the ticket */ 897 /* get the IPv4 address of the entity that requested the ticket */
898 memcpy(&addr, p, sizeof(addr)); 898 memcpy(&addr, p, sizeof(addr));
899 p += 4; 899 p += 4;
900 _debug("KIV ADDR : "NIPQUAD_FMT, NIPQUAD(addr)); 900 _debug("KIV ADDR : %pI4", &addr);
901 901
902 /* get the session key from the ticket */ 902 /* get the session key from the ticket */
903 memcpy(&key, p, sizeof(key)); 903 memcpy(&key, p, sizeof(key));
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 0b65354aaf64..a8ca743241ee 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -482,9 +482,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
482 if (saddr) 482 if (saddr)
483 fl.fl4_src = saddr->v4.sin_addr.s_addr; 483 fl.fl4_src = saddr->v4.sin_addr.s_addr;
484 484
485 SCTP_DEBUG_PRINTK("%s: DST:%u.%u.%u.%u, SRC:%u.%u.%u.%u - ", 485 SCTP_DEBUG_PRINTK("%s: DST:%pI4, SRC:%pI4 - ",
486 __func__, NIPQUAD(fl.fl4_dst), 486 __func__, &fl.fl4_dst, &fl.fl4_src);
487 NIPQUAD(fl.fl4_src));
488 487
489 if (!ip_route_output_key(&init_net, &rt, &fl)) { 488 if (!ip_route_output_key(&init_net, &rt, &fl)) {
490 dst = &rt->u.dst; 489 dst = &rt->u.dst;
@@ -540,8 +539,8 @@ out_unlock:
540 rcu_read_unlock(); 539 rcu_read_unlock();
541out: 540out:
542 if (dst) 541 if (dst)
543 SCTP_DEBUG_PRINTK("rt_dst:%u.%u.%u.%u, rt_src:%u.%u.%u.%u\n", 542 SCTP_DEBUG_PRINTK("rt_dst:%pI4, rt_src:%pI4\n",
544 NIPQUAD(rt->rt_dst), NIPQUAD(rt->rt_src)); 543 &rt->rt_dst, &rt->rt_src);
545 else 544 else
546 SCTP_DEBUG_PRINTK("NO ROUTE\n"); 545 SCTP_DEBUG_PRINTK("NO ROUTE\n");
547 546
@@ -646,7 +645,7 @@ static void sctp_v4_addr_v4map(struct sctp_sock *sp, union sctp_addr *addr)
646/* Dump the v4 addr to the seq file. */ 645/* Dump the v4 addr to the seq file. */
647static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr) 646static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
648{ 647{
649 seq_printf(seq, "%d.%d.%d.%d ", NIPQUAD(addr->v4.sin_addr)); 648 seq_printf(seq, "%pI4 ", &addr->v4.sin_addr);
650} 649}
651 650
652static void sctp_v4_ecn_capable(struct sock *sk) 651static void sctp_v4_ecn_capable(struct sock *sk)
@@ -866,11 +865,10 @@ static inline int sctp_v4_xmit(struct sk_buff *skb,
866{ 865{
867 struct inet_sock *inet = inet_sk(skb->sk); 866 struct inet_sock *inet = inet_sk(skb->sk);
868 867
869 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, " 868 SCTP_DEBUG_PRINTK("%s: skb:%p, len:%d, src:%pI4, dst:%pI4\n",
870 "src:%u.%u.%u.%u, dst:%u.%u.%u.%u\n",
871 __func__, skb, skb->len, 869 __func__, skb, skb->len,
872 NIPQUAD(skb->rtable->rt_src), 870 &skb->rtable->rt_src,
873 NIPQUAD(skb->rtable->rt_dst)); 871 &skb->rtable->rt_dst);
874 872
875 inet->pmtudisc = transport->param_flags & SPP_PMTUD_ENABLE ? 873 inet->pmtudisc = transport->param_flags & SPP_PMTUD_ENABLE ?
876 IP_PMTUDISC_DO : IP_PMTUDISC_DONT; 874 IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index d07b484b873a..9f2a3eb656e5 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -1130,11 +1130,10 @@ sctp_disposition_t sctp_sf_backbeat_8_3(const struct sctp_endpoint *ep,
1130 } else { 1130 } else {
1131 if (net_ratelimit()) 1131 if (net_ratelimit())
1132 printk(KERN_WARNING 1132 printk(KERN_WARNING
1133 "%s association %p could not find address " 1133 "%s association %p could not find address %pI4\n",
1134 NIPQUAD_FMT "\n",
1135 __func__, 1134 __func__,
1136 asoc, 1135 asoc,
1137 NIPQUAD(from_addr.v4.sin_addr.s_addr)); 1136 &from_addr.v4.sin_addr.s_addr);
1138 } 1137 }
1139 return SCTP_DISPOSITION_DISCARD; 1138 return SCTP_DISPOSITION_DISCARD;
1140 } 1139 }
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 8f067497c212..3ca518386d15 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -271,8 +271,8 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args)
271 case AF_INET: { 271 case AF_INET: {
272 struct sockaddr_in *sin = 272 struct sockaddr_in *sin =
273 (struct sockaddr_in *)args->address; 273 (struct sockaddr_in *)args->address;
274 snprintf(servername, sizeof(servername), NIPQUAD_FMT, 274 snprintf(servername, sizeof(servername), "%pI4",
275 NIPQUAD(sin->sin_addr.s_addr)); 275 &sin->sin_addr.s_addr);
276 break; 276 break;
277 } 277 }
278 case AF_INET6: { 278 case AF_INET6: {
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 4c8adadc214d..03ae007641e4 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -270,10 +270,9 @@ static int rpcb_register_netid4(struct sockaddr_in *address_to_register,
270 char buf[32]; 270 char buf[32];
271 271
272 /* Construct AF_INET universal address */ 272 /* Construct AF_INET universal address */
273 snprintf(buf, sizeof(buf), 273 snprintf(buf, sizeof(buf), "%pI4.%u.%u",
274 NIPQUAD_FMT".%u.%u", 274 &address_to_register->sin_addr.s_addr,
275 NIPQUAD(address_to_register->sin_addr.s_addr), 275 port >> 8, port & 0xff);
276 port >> 8, port & 0xff);
277 map->r_addr = buf; 276 map->r_addr = buf;
278 277
279 dprintk("RPC: %sregistering [%u, %u, %s, '%s'] with " 278 dprintk("RPC: %sregistering [%u, %u, %s, '%s'] with "
@@ -422,8 +421,8 @@ int rpcb_getport_sync(struct sockaddr_in *sin, u32 prog, u32 vers, int prot)
422 struct rpc_clnt *rpcb_clnt; 421 struct rpc_clnt *rpcb_clnt;
423 int status; 422 int status;
424 423
425 dprintk("RPC: %s(" NIPQUAD_FMT ", %u, %u, %d)\n", 424 dprintk("RPC: %s(%pI4, %u, %u, %d)\n",
426 __func__, NIPQUAD(sin->sin_addr.s_addr), prog, vers, prot); 425 __func__, &sin->sin_addr.s_addr, prog, vers, prot);
427 426
428 rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin, 427 rpcb_clnt = rpcb_create(NULL, (struct sockaddr *)sin,
429 sizeof(*sin), prot, RPCBVERS_2); 428 sizeof(*sin), prot, RPCBVERS_2);
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 16f714a247bc..82240e6127b2 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -162,11 +162,7 @@ static void ip_map_request(struct cache_detail *cd,
162 struct ip_map *im = container_of(h, struct ip_map, h); 162 struct ip_map *im = container_of(h, struct ip_map, h);
163 163
164 if (ipv6_addr_v4mapped(&(im->m_addr))) { 164 if (ipv6_addr_v4mapped(&(im->m_addr))) {
165 snprintf(text_addr, 20, NIPQUAD_FMT, 165 snprintf(text_addr, 20, "%pI4", &im->m_addr.s6_addr32[3]);
166 ntohl(im->m_addr.s6_addr32[3]) >> 24 & 0xff,
167 ntohl(im->m_addr.s6_addr32[3]) >> 16 & 0xff,
168 ntohl(im->m_addr.s6_addr32[3]) >> 8 & 0xff,
169 ntohl(im->m_addr.s6_addr32[3]) >> 0 & 0xff);
170 } else { 166 } else {
171 snprintf(text_addr, 40, "%pI6", &im->m_addr); 167 snprintf(text_addr, 40, "%pI6", &im->m_addr);
172 } 168 }
@@ -208,7 +204,7 @@ static int ip_map_parse(struct cache_detail *cd,
208 len = qword_get(&mesg, buf, mlen); 204 len = qword_get(&mesg, buf, mlen);
209 if (len <= 0) return -EINVAL; 205 if (len <= 0) return -EINVAL;
210 206
211 if (sscanf(buf, NIPQUAD_FMT "%c", &b1, &b2, &b3, &b4, &c) == 4) { 207 if (sscanf(buf, "%u.%u.%u.%u%c", &b1, &b2, &b3, &b4, &c) == 4) {
212 addr.s6_addr32[0] = 0; 208 addr.s6_addr32[0] = 0;
213 addr.s6_addr32[1] = 0; 209 addr.s6_addr32[1] = 0;
214 addr.s6_addr32[2] = htonl(0xffff); 210 addr.s6_addr32[2] = htonl(0xffff);
@@ -278,13 +274,8 @@ static int ip_map_show(struct seq_file *m,
278 dom = im->m_client->h.name; 274 dom = im->m_client->h.name;
279 275
280 if (ipv6_addr_v4mapped(&addr)) { 276 if (ipv6_addr_v4mapped(&addr)) {
281 seq_printf(m, "%s " NIPQUAD_FMT " %s\n", 277 seq_printf(m, "%s %pI4 %s\n",
282 im->m_class, 278 im->m_class, &addr.s6_addr32[3], dom);
283 ntohl(addr.s6_addr32[3]) >> 24 & 0xff,
284 ntohl(addr.s6_addr32[3]) >> 16 & 0xff,
285 ntohl(addr.s6_addr32[3]) >> 8 & 0xff,
286 ntohl(addr.s6_addr32[3]) >> 0 & 0xff,
287 dom);
288 } else { 279 } else {
289 seq_printf(m, "%s %pI6 %s\n", im->m_class, &addr, dom); 280 seq_printf(m, "%s %pI6 %s\n", im->m_class, &addr, dom);
290 } 281 }
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 95293f549e9c..6f7d1f2d2f36 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -250,10 +250,10 @@ static int one_sock_name(char *buf, struct svc_sock *svsk)
250 250
251 switch(svsk->sk_sk->sk_family) { 251 switch(svsk->sk_sk->sk_family) {
252 case AF_INET: 252 case AF_INET:
253 len = sprintf(buf, "ipv4 %s %u.%u.%u.%u %d\n", 253 len = sprintf(buf, "ipv4 %s %pI4 %d\n",
254 svsk->sk_sk->sk_protocol==IPPROTO_UDP? 254 svsk->sk_sk->sk_protocol == IPPROTO_UDP ?
255 "udp" : "tcp", 255 "udp" : "tcp",
256 NIPQUAD(inet_sk(svsk->sk_sk)->rcv_saddr), 256 &inet_sk(svsk->sk_sk)->rcv_saddr,
257 inet_sk(svsk->sk_sk)->num); 257 inet_sk(svsk->sk_sk)->num);
258 break; 258 break;
259 default: 259 default:
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 6fb493cbd29f..f8500f018f8a 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -1048,21 +1048,21 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
1048 1048
1049 dprintk("svcrdma: new connection %p accepted with the following " 1049 dprintk("svcrdma: new connection %p accepted with the following "
1050 "attributes:\n" 1050 "attributes:\n"
1051 " local_ip : %d.%d.%d.%d\n" 1051 " local_ip : %pI4\n"
1052 " local_port : %d\n" 1052 " local_port : %d\n"
1053 " remote_ip : %d.%d.%d.%d\n" 1053 " remote_ip : %pI4\n"
1054 " remote_port : %d\n" 1054 " remote_port : %d\n"
1055 " max_sge : %d\n" 1055 " max_sge : %d\n"
1056 " sq_depth : %d\n" 1056 " sq_depth : %d\n"
1057 " max_requests : %d\n" 1057 " max_requests : %d\n"
1058 " ord : %d\n", 1058 " ord : %d\n",
1059 newxprt, 1059 newxprt,
1060 NIPQUAD(((struct sockaddr_in *)&newxprt->sc_cm_id-> 1060 &((struct sockaddr_in *)&newxprt->sc_cm_id->
1061 route.addr.src_addr)->sin_addr.s_addr), 1061 route.addr.src_addr)->sin_addr.s_addr,
1062 ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id-> 1062 ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id->
1063 route.addr.src_addr)->sin_port), 1063 route.addr.src_addr)->sin_port),
1064 NIPQUAD(((struct sockaddr_in *)&newxprt->sc_cm_id-> 1064 &((struct sockaddr_in *)&newxprt->sc_cm_id->
1065 route.addr.dst_addr)->sin_addr.s_addr), 1065 route.addr.dst_addr)->sin_addr.s_addr,
1066 ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id-> 1066 ntohs(((struct sockaddr_in *)&newxprt->sc_cm_id->
1067 route.addr.dst_addr)->sin_port), 1067 route.addr.dst_addr)->sin_port),
1068 newxprt->sc_max_sge, 1068 newxprt->sc_max_sge,
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 9839c3d94145..1dd6123070e9 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -174,7 +174,7 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
174 174
175 buf = kzalloc(20, GFP_KERNEL); 175 buf = kzalloc(20, GFP_KERNEL);
176 if (buf) 176 if (buf)
177 snprintf(buf, 20, NIPQUAD_FMT, NIPQUAD(addr->sin_addr.s_addr)); 177 snprintf(buf, 20, "%pI4", &addr->sin_addr.s_addr);
178 xprt->address_strings[RPC_DISPLAY_ADDR] = buf; 178 xprt->address_strings[RPC_DISPLAY_ADDR] = buf;
179 179
180 buf = kzalloc(8, GFP_KERNEL); 180 buf = kzalloc(8, GFP_KERNEL);
@@ -186,8 +186,8 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
186 186
187 buf = kzalloc(48, GFP_KERNEL); 187 buf = kzalloc(48, GFP_KERNEL);
188 if (buf) 188 if (buf)
189 snprintf(buf, 48, "addr="NIPQUAD_FMT" port=%u proto=%s", 189 snprintf(buf, 48, "addr=%pI4 port=%u proto=%s",
190 NIPQUAD(addr->sin_addr.s_addr), 190 &addr->sin_addr.s_addr,
191 ntohs(addr->sin_port), "rdma"); 191 ntohs(addr->sin_port), "rdma");
192 xprt->address_strings[RPC_DISPLAY_ALL] = buf; 192 xprt->address_strings[RPC_DISPLAY_ALL] = buf;
193 193
@@ -204,8 +204,8 @@ xprt_rdma_format_addresses(struct rpc_xprt *xprt)
204 204
205 buf = kzalloc(30, GFP_KERNEL); 205 buf = kzalloc(30, GFP_KERNEL);
206 if (buf) 206 if (buf)
207 snprintf(buf, 30, NIPQUAD_FMT".%u.%u", 207 snprintf(buf, 30, "%pI4.%u.%u",
208 NIPQUAD(addr->sin_addr.s_addr), 208 &addr->sin_addr.s_addr,
209 ntohs(addr->sin_port) >> 8, 209 ntohs(addr->sin_port) >> 8,
210 ntohs(addr->sin_port) & 0xff); 210 ntohs(addr->sin_port) & 0xff);
211 xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf; 211 xprt->address_strings[RPC_DISPLAY_UNIVERSAL_ADDR] = buf;
@@ -369,8 +369,8 @@ xprt_setup_rdma(struct xprt_create *args)
369 if (ntohs(sin->sin_port) != 0) 369 if (ntohs(sin->sin_port) != 0)
370 xprt_set_bound(xprt); 370 xprt_set_bound(xprt);
371 371
372 dprintk("RPC: %s: %u.%u.%u.%u:%u\n", __func__, 372 dprintk("RPC: %s: %pI4:%u\n",
373 NIPQUAD(sin->sin_addr.s_addr), ntohs(sin->sin_port)); 373 __func__, &sin->sin_addr.s_addr, ntohs(sin->sin_port));
374 374
375 /* Set max requests */ 375 /* Set max requests */
376 cdata.max_requests = xprt->max_reqs; 376 cdata.max_requests = xprt->max_reqs;
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index a5fef5e6c323..78f7f728ef10 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -323,12 +323,11 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event)
323 case RDMA_CM_EVENT_DEVICE_REMOVAL: 323 case RDMA_CM_EVENT_DEVICE_REMOVAL:
324 connstate = -ENODEV; 324 connstate = -ENODEV;
325connected: 325connected:
326 dprintk("RPC: %s: %s: %u.%u.%u.%u:%u" 326 dprintk("RPC: %s: %s: %pI4:%u (ep 0x%p event 0x%x)\n",
327 " (ep 0x%p event 0x%x)\n",
328 __func__, 327 __func__,
329 (event->event <= 11) ? conn[event->event] : 328 (event->event <= 11) ? conn[event->event] :
330 "unknown connection error", 329 "unknown connection error",
331 NIPQUAD(addr->sin_addr.s_addr), 330 &addr->sin_addr.s_addr,
332 ntohs(addr->sin_port), 331 ntohs(addr->sin_port),
333 ep, event->event); 332 ep, event->event);
334 atomic_set(&rpcx_to_rdmax(ep->rep_xprt)->rx_buf.rb_credits, 1); 333 atomic_set(&rpcx_to_rdmax(ep->rep_xprt)->rx_buf.rb_credits, 1);
@@ -348,18 +347,17 @@ connected:
348 if (connstate == 1) { 347 if (connstate == 1) {
349 int ird = attr.max_dest_rd_atomic; 348 int ird = attr.max_dest_rd_atomic;
350 int tird = ep->rep_remote_cma.responder_resources; 349 int tird = ep->rep_remote_cma.responder_resources;
351 printk(KERN_INFO "rpcrdma: connection to %u.%u.%u.%u:%u " 350 printk(KERN_INFO "rpcrdma: connection to %pI4:%u "
352 "on %s, memreg %d slots %d ird %d%s\n", 351 "on %s, memreg %d slots %d ird %d%s\n",
353 NIPQUAD(addr->sin_addr.s_addr), 352 &addr->sin_addr.s_addr,
354 ntohs(addr->sin_port), 353 ntohs(addr->sin_port),
355 ia->ri_id->device->name, 354 ia->ri_id->device->name,
356 ia->ri_memreg_strategy, 355 ia->ri_memreg_strategy,
357 xprt->rx_buf.rb_max_requests, 356 xprt->rx_buf.rb_max_requests,
358 ird, ird < 4 && ird < tird / 2 ? " (low!)" : ""); 357 ird, ird < 4 && ird < tird / 2 ? " (low!)" : "");
359 } else if (connstate < 0) { 358 } else if (connstate < 0) {
360 printk(KERN_INFO "rpcrdma: connection to %u.%u.%u.%u:%u " 359 printk(KERN_INFO "rpcrdma: connection to %pI4:%u closed (%d)\n",
361 "closed (%d)\n", 360 &addr->sin_addr.s_addr,
362 NIPQUAD(addr->sin_addr.s_addr),
363 ntohs(addr->sin_port), 361 ntohs(addr->sin_port),
364 connstate); 362 connstate);
365 } 363 }
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 82a9b6286dd3..c14d3fd8f328 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -284,8 +284,7 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt,
284 284
285 buf = kzalloc(20, GFP_KERNEL); 285 buf = kzalloc(20, GFP_KERNEL);
286 if (buf) { 286 if (buf) {
287 snprintf(buf, 20, NIPQUAD_FMT, 287 snprintf(buf, 20, "pI4", &addr->sin_addr.s_addr);
288 NIPQUAD(addr->sin_addr.s_addr));
289 } 288 }
290 xprt->address_strings[RPC_DISPLAY_ADDR] = buf; 289 xprt->address_strings[RPC_DISPLAY_ADDR] = buf;
291 290
@@ -300,8 +299,8 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt,
300 299
301 buf = kzalloc(48, GFP_KERNEL); 300 buf = kzalloc(48, GFP_KERNEL);
302 if (buf) { 301 if (buf) {
303 snprintf(buf, 48, "addr="NIPQUAD_FMT" port=%u proto=%s", 302 snprintf(buf, 48, "addr=%pI4 port=%u proto=%s",
304 NIPQUAD(addr->sin_addr.s_addr), 303 &addr->sin_addr.s_addr,
305 ntohs(addr->sin_port), 304 ntohs(addr->sin_port),
306 protocol); 305 protocol);
307 } 306 }
@@ -323,8 +322,8 @@ static void xs_format_ipv4_peer_addresses(struct rpc_xprt *xprt,
323 322
324 buf = kzalloc(30, GFP_KERNEL); 323 buf = kzalloc(30, GFP_KERNEL);
325 if (buf) { 324 if (buf) {
326 snprintf(buf, 30, NIPQUAD_FMT".%u.%u", 325 snprintf(buf, 30, "%pI4.%u.%u",
327 NIPQUAD(addr->sin_addr.s_addr), 326 &addr->sin_addr.s_addr,
328 ntohs(addr->sin_port) >> 8, 327 ntohs(addr->sin_port) >> 8,
329 ntohs(addr->sin_port) & 0xff); 328 ntohs(addr->sin_port) & 0xff);
330 } 329 }
@@ -1413,8 +1412,8 @@ static int xs_bind4(struct sock_xprt *transport, struct socket *sock)
1413 if (port > last) 1412 if (port > last)
1414 nloop++; 1413 nloop++;
1415 } while (err == -EADDRINUSE && nloop != 2); 1414 } while (err == -EADDRINUSE && nloop != 2);
1416 dprintk("RPC: %s "NIPQUAD_FMT":%u: %s (%d)\n", 1415 dprintk("RPC: %s %pI4:%u: %s (%d)\n",
1417 __func__, NIPQUAD(myaddr.sin_addr), 1416 __func__, &myaddr.sin_addr,
1418 port, err ? "failed" : "ok", err); 1417 port, err ? "failed" : "ok", err);
1419 return err; 1418 return err;
1420} 1419}
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index f072598c8d68..fe596c6ef353 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2455,13 +2455,11 @@ static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp,
2455 2455
2456 switch(sel->family) { 2456 switch(sel->family) {
2457 case AF_INET: 2457 case AF_INET:
2458 audit_log_format(audit_buf, " src=" NIPQUAD_FMT, 2458 audit_log_format(audit_buf, " src=%pI4", &sel->saddr.a4);
2459 NIPQUAD(sel->saddr.a4));
2460 if (sel->prefixlen_s != 32) 2459 if (sel->prefixlen_s != 32)
2461 audit_log_format(audit_buf, " src_prefixlen=%d", 2460 audit_log_format(audit_buf, " src_prefixlen=%d",
2462 sel->prefixlen_s); 2461 sel->prefixlen_s);
2463 audit_log_format(audit_buf, " dst=" NIPQUAD_FMT, 2462 audit_log_format(audit_buf, " dst=%pI4", &sel->daddr.a4);
2464 NIPQUAD(sel->daddr.a4));
2465 if (sel->prefixlen_d != 32) 2463 if (sel->prefixlen_d != 32)
2466 audit_log_format(audit_buf, " dst_prefixlen=%d", 2464 audit_log_format(audit_buf, " dst_prefixlen=%d",
2467 sel->prefixlen_d); 2465 sel->prefixlen_d);
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 304eca4ac970..cd9d9171ded7 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2109,10 +2109,8 @@ static void xfrm_audit_helper_sainfo(struct xfrm_state *x,
2109 2109
2110 switch(x->props.family) { 2110 switch(x->props.family) {
2111 case AF_INET: 2111 case AF_INET:
2112 audit_log_format(audit_buf, 2112 audit_log_format(audit_buf, " src=%pI4 dst=%pI4",
2113 " src=" NIPQUAD_FMT " dst=" NIPQUAD_FMT, 2113 &x->props.saddr.a4, &x->id.daddr.a4);
2114 NIPQUAD(x->props.saddr.a4),
2115 NIPQUAD(x->id.daddr.a4));
2116 break; 2114 break;
2117 case AF_INET6: 2115 case AF_INET6:
2118 audit_log_format(audit_buf, " src=%pI6 dst=%pI6", 2116 audit_log_format(audit_buf, " src=%pI6 dst=%pI6",
@@ -2132,10 +2130,8 @@ static void xfrm_audit_helper_pktinfo(struct sk_buff *skb, u16 family,
2132 switch (family) { 2130 switch (family) {
2133 case AF_INET: 2131 case AF_INET:
2134 iph4 = ip_hdr(skb); 2132 iph4 = ip_hdr(skb);
2135 audit_log_format(audit_buf, 2133 audit_log_format(audit_buf, " src=%pI4 dst=%pI4",
2136 " src=" NIPQUAD_FMT " dst=" NIPQUAD_FMT, 2134 &iph4->saddr, &iph4->daddr);
2137 NIPQUAD(iph4->saddr),
2138 NIPQUAD(iph4->daddr));
2139 break; 2135 break;
2140 case AF_INET6: 2136 case AF_INET6:
2141 iph6 = ipv6_hdr(skb); 2137 iph6 = ipv6_hdr(skb);