Skip to content

Commit

Permalink
net: replace %p6 with %pI6
Browse files Browse the repository at this point in the history
Signed-off-by: Harvey Harrison <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hharrison authored and davem330 committed Oct 29, 2008
1 parent 4b7a427 commit 5b095d9
Show file tree
Hide file tree
Showing 49 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion drivers/firmware/iscsi_ibft.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static ssize_t sprintf_ipaddr(char *buf, u8 *ip)
/*
* IPv6
*/
str += sprintf(str, "%p6", ip);
str += sprintf(str, "%pI6", ip);
}
str += sprintf(str, "\n");
return str - buf;
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/core/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
if (ret)
return ret;

return sprintf(buf, "%p6\n", gid.raw);
return sprintf(buf, "%pI6\n", gid.raw);
}

static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/mthca/mthca_mcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static int find_mgm(struct mthca_dev *dev,
}

if (0)
mthca_dbg(dev, "Hash for %p6 is %04x\n", gid, *hash);
mthca_dbg(dev, "Hash for %pI6 is %04x\n", gid, *hash);

*index = *hash;
*prev = -1;
Expand Down Expand Up @@ -254,7 +254,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
goto out;

if (index == -1) {
mthca_err(dev, "MGID %p6 not found\n", gid->raw);
mthca_err(dev, "MGID %pI6 not found\n", gid->raw);
err = -EINVAL;
goto out;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/ulp/ipoib/ipoib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
goto err_send_cm;
}

ipoib_dbg(priv, "Request connection 0x%x for gid %p6 qpn 0x%x\n",
ipoib_dbg(priv, "Request connection 0x%x for gid %pI6 qpn 0x%x\n",
p->qp->qp_num, pathrec->dgid.raw, qpn);

return 0;
Expand Down Expand Up @@ -1276,7 +1276,7 @@ void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx)
if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &tx->flags)) {
list_move(&tx->list, &priv->cm.reap_list);
queue_work(ipoib_workqueue, &priv->cm.reap_task);
ipoib_dbg(priv, "Reap connection for gid %p6\n",
ipoib_dbg(priv, "Reap connection for gid %pI6\n",
tx->neigh->dgid.raw);
tx->neigh = NULL;
}
Expand Down
12 changes: 6 additions & 6 deletions drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void ipoib_mark_paths_invalid(struct net_device *dev)
spin_lock_irq(&priv->lock);

list_for_each_entry_safe(path, tp, &priv->path_list, list) {
ipoib_dbg(priv, "mark path LID 0x%04x GID %p6 invalid\n",
ipoib_dbg(priv, "mark path LID 0x%04x GID %pI6 invalid\n",
be16_to_cpu(path->pathrec.dlid),
path->pathrec.dgid.raw);
path->valid = 0;
Expand Down Expand Up @@ -413,10 +413,10 @@ static void path_rec_completion(int status,
unsigned long flags;

if (!status)
ipoib_dbg(priv, "PathRec LID 0x%04x for GID %p6\n",
ipoib_dbg(priv, "PathRec LID 0x%04x for GID %pI6\n",
be16_to_cpu(pathrec->dlid), pathrec->dgid.raw);
else
ipoib_dbg(priv, "PathRec status %d for GID %p6\n",
ipoib_dbg(priv, "PathRec status %d for GID %pI6\n",
status, path->pathrec.dgid.raw);

skb_queue_head_init(&skqueue);
Expand Down Expand Up @@ -527,7 +527,7 @@ static int path_rec_start(struct net_device *dev,
{
struct ipoib_dev_priv *priv = netdev_priv(dev);

ipoib_dbg(priv, "Start path record lookup for %p6\n",
ipoib_dbg(priv, "Start path record lookup for %pI6\n",
path->pathrec.dgid.raw);

init_completion(&path->done);
Expand Down Expand Up @@ -764,7 +764,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev)

if ((be16_to_cpup((__be16 *) skb->data) != ETH_P_ARP) &&
(be16_to_cpup((__be16 *) skb->data) != ETH_P_RARP)) {
ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %p6\n",
ipoib_warn(priv, "Unicast, no %s: type %04x, QPN %06x %pI6\n",
skb->dst ? "neigh" : "dst",
be16_to_cpup((__be16 *) skb->data),
IPOIB_QPN(phdr->hwaddr),
Expand Down Expand Up @@ -844,7 +844,7 @@ static void ipoib_neigh_cleanup(struct neighbour *n)
else
return;
ipoib_dbg(priv,
"neigh_cleanup for %06x %p6\n",
"neigh_cleanup for %06x %pI6\n",
IPOIB_QPN(n->ha),
n->ha + 4);

Expand Down
30 changes: 15 additions & 15 deletions drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void ipoib_mcast_free(struct ipoib_mcast *mcast)
struct ipoib_neigh *neigh, *tmp;
int tx_dropped = 0;

ipoib_dbg_mcast(netdev_priv(dev), "deleting multicast group %p6\n",
ipoib_dbg_mcast(netdev_priv(dev), "deleting multicast group %pI6\n",
mcast->mcmember.mgid.raw);

spin_lock_irq(&priv->lock);
Expand Down Expand Up @@ -204,7 +204,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,

if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
if (test_and_set_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
ipoib_warn(priv, "multicast group %p6 already attached\n",
ipoib_warn(priv, "multicast group %pI6 already attached\n",
mcast->mcmember.mgid.raw);

return 0;
Expand All @@ -213,7 +213,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
ret = ipoib_mcast_attach(dev, be16_to_cpu(mcast->mcmember.mlid),
&mcast->mcmember.mgid, set_qkey);
if (ret < 0) {
ipoib_warn(priv, "couldn't attach QP to multicast group %p6\n",
ipoib_warn(priv, "couldn't attach QP to multicast group %pI6\n",
mcast->mcmember.mgid.raw);

clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags);
Expand Down Expand Up @@ -245,7 +245,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
mcast->ah = ah;
spin_unlock_irq(&priv->lock);

ipoib_dbg_mcast(priv, "MGID %p6 AV %p, LID 0x%04x, SL %d\n",
ipoib_dbg_mcast(priv, "MGID %pI6 AV %p, LID 0x%04x, SL %d\n",
mcast->mcmember.mgid.raw,
mcast->ah->ah,
be16_to_cpu(mcast->mcmember.mlid),
Expand Down Expand Up @@ -291,7 +291,7 @@ ipoib_mcast_sendonly_join_complete(int status,

if (status) {
if (mcast->logcount++ < 20)
ipoib_dbg_mcast(netdev_priv(dev), "multicast join failed for %p6, status %d\n",
ipoib_dbg_mcast(netdev_priv(dev), "multicast join failed for %pI6, status %d\n",
mcast->mcmember.mgid.raw, status);

/* Flush out any queued packets */
Expand Down Expand Up @@ -351,7 +351,7 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast)
ipoib_warn(priv, "ib_sa_join_multicast failed (ret = %d)\n",
ret);
} else {
ipoib_dbg_mcast(priv, "no multicast record for %p6, starting join\n",
ipoib_dbg_mcast(priv, "no multicast record for %pI6, starting join\n",
mcast->mcmember.mgid.raw);
}

Expand Down Expand Up @@ -380,7 +380,7 @@ static int ipoib_mcast_join_complete(int status,
struct net_device *dev = mcast->dev;
struct ipoib_dev_priv *priv = netdev_priv(dev);

ipoib_dbg_mcast(priv, "join completion for %p6 (status %d)\n",
ipoib_dbg_mcast(priv, "join completion for %pI6 (status %d)\n",
mcast->mcmember.mgid.raw, status);

/* We trap for port events ourselves. */
Expand Down Expand Up @@ -410,10 +410,10 @@ static int ipoib_mcast_join_complete(int status,

if (mcast->logcount++ < 20) {
if (status == -ETIMEDOUT) {
ipoib_dbg_mcast(priv, "multicast join failed for %p6, status %d\n",
ipoib_dbg_mcast(priv, "multicast join failed for %pI6, status %d\n",
mcast->mcmember.mgid.raw, status);
} else {
ipoib_warn(priv, "multicast join failed for %p6, status %d\n",
ipoib_warn(priv, "multicast join failed for %pI6, status %d\n",
mcast->mcmember.mgid.raw, status);
}
}
Expand Down Expand Up @@ -446,7 +446,7 @@ static void ipoib_mcast_join(struct net_device *dev, struct ipoib_mcast *mcast,
ib_sa_comp_mask comp_mask;
int ret = 0;

ipoib_dbg_mcast(priv, "joining MGID %p6\n", mcast->mcmember.mgid.raw);
ipoib_dbg_mcast(priv, "joining MGID %pI6\n", mcast->mcmember.mgid.raw);

rec.mgid = mcast->mcmember.mgid;
rec.port_gid = priv->local_gid;
Expand Down Expand Up @@ -631,7 +631,7 @@ static int ipoib_mcast_leave(struct net_device *dev, struct ipoib_mcast *mcast)
ib_sa_free_multicast(mcast->mc);

if (test_and_clear_bit(IPOIB_MCAST_FLAG_ATTACHED, &mcast->flags)) {
ipoib_dbg_mcast(priv, "leaving MGID %p6\n",
ipoib_dbg_mcast(priv, "leaving MGID %pI6\n",
mcast->mcmember.mgid.raw);

/* Remove ourselves from the multicast group */
Expand Down Expand Up @@ -663,7 +663,7 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
mcast = __ipoib_mcast_find(dev, mgid);
if (!mcast) {
/* Let's create a new send only group now */
ipoib_dbg_mcast(priv, "setting up send only multicast group for %p6\n",
ipoib_dbg_mcast(priv, "setting up send only multicast group for %pI6\n",
mgid);

mcast = ipoib_mcast_alloc(dev, 0);
Expand Down Expand Up @@ -797,13 +797,13 @@ void ipoib_mcast_restart_task(struct work_struct *work)
/* ignore group which is directly joined by userspace */
if (test_bit(IPOIB_FLAG_UMCAST, &priv->flags) &&
!ib_sa_get_mcmember_rec(priv->ca, priv->port, &mgid, &rec)) {
ipoib_dbg_mcast(priv, "ignoring multicast entry for mgid %p6\n",
ipoib_dbg_mcast(priv, "ignoring multicast entry for mgid %pI6\n",
mgid.raw);
continue;
}

/* Not found or send-only group, let's add a new entry */
ipoib_dbg_mcast(priv, "adding multicast entry for mgid %p6\n",
ipoib_dbg_mcast(priv, "adding multicast entry for mgid %pI6\n",
mgid.raw);

nmcast = ipoib_mcast_alloc(dev, 0);
Expand Down Expand Up @@ -837,7 +837,7 @@ void ipoib_mcast_restart_task(struct work_struct *work)
list_for_each_entry_safe(mcast, tmcast, &priv->multicast_list, list) {
if (!test_bit(IPOIB_MCAST_FLAG_FOUND, &mcast->flags) &&
!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
ipoib_dbg_mcast(priv, "deleting multicast group %p6\n",
ipoib_dbg_mcast(priv, "deleting multicast group %pI6\n",
mcast->mcmember.mgid.raw);

rb_erase(&mcast->rb_node, &priv->multicast_tree);
Expand Down
6 changes: 3 additions & 3 deletions drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ static ssize_t show_dgid(struct device *dev, struct device_attribute *attr,
target->state == SRP_TARGET_REMOVED)
return -ENODEV;

return sprintf(buf, "%p6\n", target->path.dgid.raw);
return sprintf(buf, "%pI6\n", target->path.dgid.raw);
}

static ssize_t show_orig_dgid(struct device *dev,
Expand All @@ -1526,7 +1526,7 @@ static ssize_t show_orig_dgid(struct device *dev,
target->state == SRP_TARGET_REMOVED)
return -ENODEV;

return sprintf(buf, "%p6\n", target->orig_dgid);
return sprintf(buf, "%pI6\n", target->orig_dgid);
}

static ssize_t show_zero_req_lim(struct device *dev,
Expand Down Expand Up @@ -1867,7 +1867,7 @@ static ssize_t srp_create_target(struct device *dev,

shost_printk(KERN_DEBUG, target->scsi_host, PFX
"new target: id_ext %016llx ioc_guid %016llx pkey %04x "
"service_id %016llx dgid %p6\n",
"service_id %016llx dgid %pI6\n",
(unsigned long long) be64_to_cpu(target->id_ext),
(unsigned long long) be64_to_cpu(target->ioc_guid),
be16_to_cpu(target->path.pkey),
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/mlx4/mcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static int find_mgm(struct mlx4_dev *dev,
return err;

if (0)
mlx4_dbg(dev, "Hash for %p6 is %04x\n", gid, *hash);
mlx4_dbg(dev, "Hash for %pI6 is %04x\n", gid, *hash);

*index = *hash;
*prev = -1;
Expand Down Expand Up @@ -267,7 +267,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16])
goto out;

if (index == -1) {
mlx4_err(dev, "MGID %p6 not found\n", gid);
mlx4_err(dev, "MGID %pI6 not found\n", gid);
err = -EINVAL;
goto out;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ static int iscsi_tcp_get_addr(struct iscsi_conn *conn, struct socket *sock,
case AF_INET6:
sin6 = (struct sockaddr_in6 *)addr;
spin_lock_bh(&conn->session->lock);
sprintf(buf, "%p6", &sin6->sin6_addr);
sprintf(buf, "%pI6", &sin6->sin6_addr);
*port = be16_to_cpu(sin6->sin6_port);
spin_unlock_bh(&conn->session->lock);
break;
Expand Down
2 changes: 1 addition & 1 deletion fs/lockd/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static void nlm_display_address(const struct sockaddr *sap,
snprintf(buf, len, NIPQUAD_FMT,
NIPQUAD(sin6->sin6_addr.s6_addr32[3]));
else
snprintf(buf, len, "%p6", &sin6->sin6_addr);
snprintf(buf, len, "%pI6", &sin6->sin6_addr);
break;
default:
snprintf(buf, len, "unsupported address family");
Expand Down
2 changes: 1 addition & 1 deletion fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
}
case AF_INET6: {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap;
seq_printf(m, ",mountaddr=%p6", &sin6->sin6_addr);
seq_printf(m, ",mountaddr=%pI6", &sin6->sin6_addr);
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion include/linux/sunrpc/svc_xprt.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static inline char *__svc_print_addr(struct sockaddr *addr,
break;

case AF_INET6:
snprintf(buf, len, "%p6, port=%u",
snprintf(buf, len, "%pI6, port=%u",
&((struct sockaddr_in6 *)addr)->sin6_addr,
ntohs(((struct sockaddr_in6 *) addr)->sin6_port));
break;
Expand Down
2 changes: 1 addition & 1 deletion include/net/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ 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, "[%p6]",
len = snprintf(&buf[*idx], buf_len - *idx, "[%pI6]",
&addr->in6) + 1;
else
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/net/netfilter/nf_conntrack_tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ 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 %p6 %hu -> %p6 %hu\n",
printk("tuple %p: %u %pI6 %hu -> %pI6 %hu\n",
t, t->dst.protonum,
t->src.u3.all, ntohs(t->src.u.all),
t->dst.u3.all, ntohs(t->dst.u.all));
Expand Down
2 changes: 1 addition & 1 deletion include/net/sctp/sctp.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ extern int sctp_debug_flag;
if (sctp_debug_flag) { \
if (saddr->sa.sa_family == AF_INET6) { \
printk(KERN_DEBUG \
lead "%p6" trail, \
lead "%pI6" trail, \
leadparm, \
&saddr->v6.sin6_addr, \
otherparms); \
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
printk(" INCOMPLETE IPv6 header");
goto out;
}
printk(" IPv6 SRC=%p6 IPv6 DST=%p6, IPv6 priority=0x%01X, Next Header=%d",
printk(" IPv6 SRC=%pI6 IPv6 DST=%pI6, IPv6 priority=0x%01X, Next Header=%d",
&ih->saddr, &ih->daddr, ih->priority, ih->nexthdr);
nexthdr = ih->nexthdr;
offset_ph = ipv6_skip_exthdr(skb, sizeof(_iph), &nexthdr);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ 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 %p6/%u c%u l%u ss%u/%u p%u\n",
printk(KERN_DEBUG "Undo %s %pI6/%u c%u l%u ss%u/%u p%u\n",
msg,
&np->daddr, ntohs(inet->dport),
tp->snd_cwnd, tcp_left_out(tp),
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ 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 %p6:%u/%u shrinks window %u:%u. Repaired.\n",
LIMIT_NETDEBUG(KERN_DEBUG "TCP: Treason uncloaked! Peer %pI6:%u/%u shrinks window %u:%u. Repaired.\n",
&np->daddr, ntohs(inet->dport),
inet->num, tp->snd_una, tp->snd_nxt);
}
Expand Down
Loading

0 comments on commit 5b095d9

Please sign in to comment.