net: replace uses of NIP6_FMT with %p6
authorHarvey Harrison <harvey.harrison@gmail.com>
Tue, 28 Oct 2008 23:09:23 +0000 (16:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Oct 2008 06:02:31 +0000 (23:02 -0700)
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 files changed:
include/linux/sunrpc/svc_xprt.h
include/net/ip_vs.h
include/net/netfilter/nf_conntrack_tuple.h
include/net/sctp/sctp.h
net/ipv4/tcp_input.c
net/ipv4/tcp_timer.c
net/ipv6/addrlabel.c
net/ipv6/ah6.c
net/ipv6/esp6.c
net/ipv6/exthdrs.c
net/ipv6/icmp.c
net/ipv6/ip6mr.c
net/ipv6/ipcomp6.c
net/ipv6/ndisc.c
net/ipv6/netfilter/ip6t_LOG.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/ipv6/tcp_ipv6.c

index 6fd7b016517f4e588f9cba7de616af751547e2c7..42e01c93c7ea1bc138d94314977efb6ffa88cf9d 100644 (file)
@@ -145,8 +145,8 @@ static inline char *__svc_print_addr(struct sockaddr *addr,
                break;
 
        case AF_INET6:
-               snprintf(buf, len, "%x:%x:%x:%x:%x:%x:%x:%x, port=%u",
-                       NIP6(((struct sockaddr_in6 *) addr)->sin6_addr),
+               snprintf(buf, len, "%p6, port=%u",
+                        &((struct sockaddr_in6 *)addr)->sin6_addr,
                        ntohs(((struct sockaddr_in6 *) addr)->sin6_port));
                break;
 
index fe9fcf73c85ed26135b802a959382a85e5d64e43..6a6692067092abb12bfee93c7ee6b96827e79097 100644 (file)
@@ -87,8 +87,8 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len,
        int len;
 #ifdef CONFIG_IP_VS_IPV6
        if (af == AF_INET6)
-               len = snprintf(&buf[*idx], buf_len - *idx, "[" NIP6_FMT "]",
-                              NIP6(addr->in6)) + 1;
+               len = snprintf(&buf[*idx], buf_len - *idx, "[%p6]",
+                              &addr->in6) + 1;
        else
 #endif
                len = snprintf(&buf[*idx], buf_len - *idx, NIPQUAD_FMT,
index a6874ba22d546322dc5ef9c2c86271003ec156e4..303efaf68d0812f6bb58e8934253d47a5cae700c 100644 (file)
@@ -122,10 +122,10 @@ static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t)
 static inline void nf_ct_dump_tuple_ipv6(const struct nf_conntrack_tuple *t)
 {
 #ifdef DEBUG
-       printk("tuple %p: %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n",
+       printk("tuple %p: %u %p6 %hu -> %p6 %hu\n",
               t, t->dst.protonum,
-              NIP6(*(struct in6_addr *)t->src.u3.all), ntohs(t->src.u.all),
-              NIP6(*(struct in6_addr *)t->dst.u3.all), ntohs(t->dst.u.all));
+              t->src.u3.all, ntohs(t->src.u.all),
+              t->dst.u3.all, ntohs(t->dst.u.all));
 #endif
 }
 
index ed71b110edf795094336e436816d9bdd5e6a1aab..a84c3976e1b0e38d9a60a1b8aedce01e036b7387 100644 (file)
@@ -285,9 +285,9 @@ extern int sctp_debug_flag;
        if (sctp_debug_flag) { \
                if (saddr->sa.sa_family == AF_INET6) { \
                        printk(KERN_DEBUG \
-                              lead NIP6_FMT trail, \
+                              lead "%p6" trail, \
                               leadparm, \
-                              NIP6(saddr->v6.sin6_addr), \
+                              &saddr->v6.sin6_addr, \
                               otherparms); \
                } else { \
                        printk(KERN_DEBUG \
index d77c0d29e2396bb6c2e4ea4cc159019a106be325..191c06bb0f67a6bd9419cb5b58fd05a28e75089e 100644 (file)
@@ -2346,9 +2346,9 @@ static void DBGUNDO(struct sock *sk, const char *msg)
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
        else if (sk->sk_family == AF_INET6) {
                struct ipv6_pinfo *np = inet6_sk(sk);
-               printk(KERN_DEBUG "Undo %s " NIP6_FMT "/%u c%u l%u ss%u/%u p%u\n",
+               printk(KERN_DEBUG "Undo %s %p6/%u c%u l%u ss%u/%u p%u\n",
                       msg,
-                      NIP6(np->daddr), ntohs(inet->dport),
+                      &np->daddr, ntohs(inet->dport),
                       tp->snd_cwnd, tcp_left_out(tp),
                       tp->snd_ssthresh, tp->prior_ssthresh,
                       tp->packets_out);
index 6b6dff1164b93209da97bf673fd76707c216ea1b..4e6ee5205237e461408ed8cf3e65089c29bc04a3 100644 (file)
@@ -306,8 +306,8 @@ static void tcp_retransmit_timer(struct sock *sk)
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
                else if (sk->sk_family == AF_INET6) {
                        struct ipv6_pinfo *np = inet6_sk(sk);
-                       LIMIT_NETDEBUG(KERN_DEBUG "TCP: Treason uncloaked! Peer " NIP6_FMT ":%u/%u shrinks window %u:%u. Repaired.\n",
-                              NIP6(np->daddr), ntohs(inet->dport),
+                       LIMIT_NETDEBUG(KERN_DEBUG "TCP: Treason uncloaked! Peer %p6:%u/%u shrinks window %u:%u. Repaired.\n",
+                              &np->daddr, ntohs(inet->dport),
                               inet->num, tp->snd_una, tp->snd_nxt);
                }
 #endif
index 08909039d87b570617750c8b9e6a27f973bbbfc4..d28036659d27325d4e4ef1d20e18c696128bfedc 100644 (file)
@@ -186,10 +186,8 @@ u32 ipv6_addr_label(struct net *net,
        label = p ? p->label : IPV6_ADDR_LABEL_DEFAULT;
        rcu_read_unlock();
 
-       ADDRLABEL(KERN_DEBUG "%s(addr=" NIP6_FMT ", type=%d, ifindex=%d) => %08x\n",
-                       __func__,
-                       NIP6(*addr), type, ifindex,
-                       label);
+       ADDRLABEL(KERN_DEBUG "%s(addr=%p6, type=%d, ifindex=%d) => %08x\n",
+                 __func__, addr, type, ifindex, label);
 
        return label;
 }
@@ -203,11 +201,8 @@ static struct ip6addrlbl_entry *ip6addrlbl_alloc(struct net *net,
        struct ip6addrlbl_entry *newp;
        int addrtype;
 
-       ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u)\n",
-                       __func__,
-                       NIP6(*prefix), prefixlen,
-                       ifindex,
-                       (unsigned int)label);
+       ADDRLABEL(KERN_DEBUG "%s(prefix=%p6, prefixlen=%d, ifindex=%d, label=%u)\n",
+                 __func__, prefix, prefixlen, ifindex, (unsigned int)label);
 
        addrtype = ipv6_addr_type(prefix) & (IPV6_ADDR_MAPPED | IPV6_ADDR_COMPATv4 | IPV6_ADDR_LOOPBACK);
 
@@ -294,12 +289,9 @@ static int ip6addrlbl_add(struct net *net,
        struct ip6addrlbl_entry *newp;
        int ret = 0;
 
-       ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n",
-                       __func__,
-                       NIP6(*prefix), prefixlen,
-                       ifindex,
-                       (unsigned int)label,
-                       replace);
+       ADDRLABEL(KERN_DEBUG "%s(prefix=%p6, prefixlen=%d, ifindex=%d, label=%u, replace=%d)\n",
+                 __func__, prefix, prefixlen, ifindex, (unsigned int)label,
+                 replace);
 
        newp = ip6addrlbl_alloc(net, prefix, prefixlen, ifindex, label);
        if (IS_ERR(newp))
@@ -321,10 +313,8 @@ static int __ip6addrlbl_del(struct net *net,
        struct hlist_node *pos, *n;
        int ret = -ESRCH;
 
-       ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
-                       __func__,
-                       NIP6(*prefix), prefixlen,
-                       ifindex);
+       ADDRLABEL(KERN_DEBUG "%s(prefix=%p6, prefixlen=%d, ifindex=%d)\n",
+                 __func__, prefix, prefixlen, ifindex);
 
        hlist_for_each_entry_safe(p, pos, n, &ip6addrlbl_table.head, list) {
                if (p->prefixlen == prefixlen &&
@@ -347,10 +337,8 @@ static int ip6addrlbl_del(struct net *net,
        struct in6_addr prefix_buf;
        int ret;
 
-       ADDRLABEL(KERN_DEBUG "%s(prefix=" NIP6_FMT ", prefixlen=%d, ifindex=%d)\n",
-                       __func__,
-                       NIP6(*prefix), prefixlen,
-                       ifindex);
+       ADDRLABEL(KERN_DEBUG "%s(prefix=%p6, prefixlen=%d, ifindex=%d)\n",
+                 __func__, prefix, prefixlen, ifindex);
 
        ipv6_addr_prefix(&prefix_buf, prefix, prefixlen);
        spin_lock(&ip6addrlbl_table.lock);
index 2ff0c8233e47a0096e5670aaa3e41d80d7e3f6a3..9bc43f2527cebf9ef575e1b412919a376d4a063f 100644 (file)
@@ -419,8 +419,8 @@ static void ah6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
        if (!x)
                return;
 
-       NETDEBUG(KERN_DEBUG "pmtu discovery on SA AH/%08x/" NIP6_FMT "\n",
-                ntohl(ah->spi), NIP6(iph->daddr));
+       NETDEBUG(KERN_DEBUG "pmtu discovery on SA AH/%08x/%p6\n",
+                ntohl(ah->spi), &iph->daddr);
 
        xfrm_state_put(x);
 }
index b181b08fb761c4f9cab3e4f06dfc439734213298..ec4be188c341ebb96e3cdef68e5c7b5f23de2e02 100644 (file)
@@ -367,8 +367,8 @@ static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
        x = xfrm_state_lookup((xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6);
        if (!x)
                return;
-       printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/" NIP6_FMT "\n",
-                       ntohl(esph->spi), NIP6(iph->daddr));
+       printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/%p6\n",
+                       ntohl(esph->spi), &iph->daddr);
        xfrm_state_put(x);
 }
 
index 6bfffec2371ccf4cced48a9ffb3cdcb512c9dc00..a89051468359718ba9d87f80c969c646b9853a6d 100644 (file)
@@ -219,7 +219,7 @@ static int ipv6_dest_hao(struct sk_buff *skb, int optoff)
 
        if (!(ipv6_addr_type(&hao->addr) & IPV6_ADDR_UNICAST)) {
                LIMIT_NETDEBUG(
-                       KERN_DEBUG "hao is not an unicast addr: " NIP6_FMT "\n", NIP6(hao->addr));
+                       KERN_DEBUG "hao is not an unicast addr: %p6\n", &hao->addr);
                goto discard;
        }
 
index 508a713ac0457909ec3b7ccf3589394db8bf08b8..b3fa38e40dc43e8db87b2a20a2d32ba3affde515 100644 (file)
@@ -681,8 +681,8 @@ static int icmpv6_rcv(struct sk_buff *skb)
                skb->csum = ~csum_unfold(csum_ipv6_magic(saddr, daddr, skb->len,
                                             IPPROTO_ICMPV6, 0));
                if (__skb_checksum_complete(skb)) {
-                       LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [" NIP6_FMT " > " NIP6_FMT "]\n",
-                                      NIP6(*saddr), NIP6(*daddr));
+                       LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [%p6 > %p6]\n",
+                                      saddr, daddr);
                        goto discard_it;
                }
        }
index 182f8a177e7f1acc6cfce06c36b1fe64ed4f6ccc..798e6a29dd83ddb17b85e431ca2113e87c1fa853 100644 (file)
@@ -297,9 +297,8 @@ static int ipmr_mfc_seq_show(struct seq_file *seq, void *v)
                const struct mfc6_cache *mfc = v;
                const struct ipmr_mfc_iter *it = seq->private;
 
-               seq_printf(seq,
-                          NIP6_FMT " " NIP6_FMT " %-3d %8ld %8ld %8ld",
-                          NIP6(mfc->mf6c_mcastgrp), NIP6(mfc->mf6c_origin),
+               seq_printf(seq, "%p6 %p6 %-3d %8ld %8ld %8ld",
+                          &mfc->mf6c_mcastgrp, &mfc->mf6c_origin,
                           mfc->mf6c_parent,
                           mfc->mfc_un.res.pkt,
                           mfc->mfc_un.res.bytes,
index 4545e4306862b104217aa5189eac1d4b64c1b43e..9566d8f73140c88ee40d2709b40010689915c08b 100644 (file)
@@ -67,8 +67,8 @@ static void ipcomp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
        if (!x)
                return;
 
-       printk(KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/" NIP6_FMT "\n",
-                       spi, NIP6(iph->daddr));
+       printk(KERN_DEBUG "pmtu discovery on SA IPCOMP/%08x/%p6\n",
+                       spi, &iph->daddr);
        xfrm_state_put(x);
 }
 
index 172438320eec74287b045cd6b784bb3de0b38b0f..191bb0722a7cf91b551e91fc18a9fbf4310cff02 100644 (file)
@@ -647,11 +647,8 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
 
        if ((probes -= neigh->parms->ucast_probes) < 0) {
                if (!(neigh->nud_state & NUD_VALID)) {
-                       ND_PRINTK1(KERN_DEBUG
-                                  "%s(): trying to ucast probe in NUD_INVALID: "
-                                  NIP6_FMT "\n",
-                                  __func__,
-                                  NIP6(*target));
+                       ND_PRINTK1(KERN_DEBUG "%s(): trying to ucast probe in NUD_INVALID: %p6\n",
+                                  __func__, target);
                }
                ndisc_send_ns(dev, neigh, target, target, saddr);
        } else if ((probes -= neigh->parms->app_probes) < 0) {
index caa441d0956755e0e59f8aa62c8572d61b2eb89c..a61ce3010007818d6b9b736fd36aeb09faa2eead 100644 (file)
@@ -61,7 +61,7 @@ static void dump_packet(const struct nf_loginfo *info,
        }
 
        /* Max length: 88 "SRC=0000.0000.0000.0000.0000.0000.0000.0000 DST=0000.0000.0000.0000.0000.0000.0000.0000 " */
-       printk("SRC=" NIP6_FMT " DST=" NIP6_FMT " ", NIP6(ih->saddr), NIP6(ih->daddr));
+       printk("SRC=%p6 DST=%p6 ", &ih->saddr, &ih->daddr);
 
        /* Max length: 44 "LEN=65535 TC=255 HOPLIMIT=255 FLOWLBL=FFFFF " */
        printk("LEN=%Zu TC=%u HOPLIMIT=%u FLOWLBL=%u ",
index e91db16611d902092b956c63031ee1c39a723d66..b165a273c6c048c50c680a334f9410873e6960f8 100644 (file)
@@ -56,9 +56,8 @@ static bool ipv6_invert_tuple(struct nf_conntrack_tuple *tuple,
 static int ipv6_print_tuple(struct seq_file *s,
                            const struct nf_conntrack_tuple *tuple)
 {
-       return seq_printf(s, "src=" NIP6_FMT " dst=" NIP6_FMT " ",
-                         NIP6(*((struct in6_addr *)tuple->src.u3.ip6)),
-                         NIP6(*((struct in6_addr *)tuple->dst.u3.ip6)));
+       return seq_printf(s, "src=%p6 dst=%p6 ",
+                         tuple->src.u3.ip6, tuple->dst.u3.ip6);
 }
 
 /*
index b6b356b7912a57c298a542731c2c9daf24a77bbc..483550cfdf338afc4e13f1caafd83fcc5c231cf5 100644 (file)
@@ -872,12 +872,10 @@ static int tcp_v6_inbound_md5_hash (struct sock *sk, struct sk_buff *skb)
 
        if (genhash || memcmp(hash_location, newhash, 16) != 0) {
                if (net_ratelimit()) {
-                       printk(KERN_INFO "MD5 Hash %s for "
-                              "(" NIP6_FMT ", %u)->"
-                              "(" NIP6_FMT ", %u)\n",
+                       printk(KERN_INFO "MD5 Hash %s for (%p6, %u)->(%p6, %u)\n",
                               genhash ? "failed" : "mismatch",
-                              NIP6(ip6h->saddr), ntohs(th->source),
-                              NIP6(ip6h->daddr), ntohs(th->dest));
+                              &ip6h->saddr, ntohs(th->source),
+                              &ip6h->daddr, ntohs(th->dest));
                }
                return 1;
        }