linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Remove most uses of NIPQUAD and NIPQUAD_FMT
@ 2010-01-06  1:20 Joe Perches
  2010-01-06  1:20 ` [PATCH 1/8] drivers/scsi: Remove uses of NIPQUAD, use %pI4 Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2010-01-06  1:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: James E.J. Bottomley, Greg Kroah-Hartman, Mark Fasheh,
	Joel Becker, Patrick McHardy, David S. Miller, Alexey Kuznetsov,
	Pekka Savola (ipv6), James Morris, Hideaki YOSHIFUJI,
	Wensong Zhang, Simon Horman, Julian Anastasov, Andy Grover,
	J. Bruce Fields, Neil Brown, Trond Myklebust, linux-scsi, devel,
	ocfs2-devel, netfilter-devel, netfilter, coreteam, netdev,
	lvs-devel, rds

Convert them to the %pI4 format extension where possible
Only a couple uses are left in netfilter.

Joe Perches (8):
  drivers/scsi: Remove uses of NIPQUAD, use %pI4
  drivers/staging/pohmelfs/inode.c: Remove uses of NIPQUAD, use %pI4
  net/rds: Remove uses of NIPQUAD, use %pI4
  net/sunrpc: Remove uses of NIPQUAD, use %pI4
  net/ipv4/netfilter/nf_nat_ftp.c: Convert NIPQUAD to %pI4
  net/netfilter/ipvs/ip_vs_ftp.c: Use standardized format in sprintf
  fs/ocfs2/cluster/tcp.c: Remove use of NIPQUAD, use %pI4
  drivers/firmware/iscsi_ibft.c: Remove NIPQUAD_FMT, use %pI4

 drivers/firmware/iscsi_ibft.c        |    8 +++-----
 drivers/scsi/bnx2i/bnx2i_iscsi.c     |    4 ++--
 drivers/scsi/cxgb3i/cxgb3i_iscsi.c   |    5 ++---
 drivers/scsi/cxgb3i/cxgb3i_offload.c |    7 ++++---
 drivers/staging/pohmelfs/inode.c     |    3 +--
 fs/ocfs2/cluster/tcp.c               |    4 ++--
 net/ipv4/netfilter/nf_nat_ftp.c      |    2 +-
 net/netfilter/ipvs/ip_vs_ftp.c       |    2 +-
 net/rds/tcp_connect.c                |    7 +++----
 net/rds/tcp_listen.c                 |    6 +++---
 net/rds/tcp_send.c                   |    4 ++--
 net/sunrpc/xprtrdma/transport.c      |    3 +--
 net/sunrpc/xprtsock.c                |    5 ++---
 13 files changed, 27 insertions(+), 33 deletions(-)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/8] drivers/scsi: Remove uses of NIPQUAD, use %pI4
  2010-01-06  1:20 [PATCH 0/8] Remove most uses of NIPQUAD and NIPQUAD_FMT Joe Perches
@ 2010-01-06  1:20 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2010-01-06  1:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: James E.J. Bottomley, linux-scsi

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/scsi/bnx2i/bnx2i_iscsi.c     |    4 ++--
 drivers/scsi/cxgb3i/cxgb3i_iscsi.c   |    5 ++---
 drivers/scsi/cxgb3i/cxgb3i_offload.c |    7 ++++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 33b2294..51709cb 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -1426,8 +1426,8 @@ static int bnx2i_conn_get_param(struct iscsi_cls_conn *cls_conn,
 		break;
 	case ISCSI_PARAM_CONN_ADDRESS:
 		if (bnx2i_conn->ep)
-			len = sprintf(buf, NIPQUAD_FMT "\n",
-				      NIPQUAD(bnx2i_conn->ep->cm_sk->dst_ip));
+			len = sprintf(buf, "%pI4\n",
+				      &bnx2i_conn->ep->cm_sk->dst_ip);
 		break;
 	default:
 		return iscsi_conn_get_param(cls_conn, param, buf);
diff --git a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
index 969c831..1fd89b2 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_iscsi.c
@@ -591,8 +591,7 @@ static int cxgb3i_conn_bind(struct iscsi_cls_session *cls_session,
 	cxgb3i_conn_max_recv_dlength(conn);
 
 	spin_lock_bh(&conn->session->lock);
-	sprintf(conn->portal_address, NIPQUAD_FMT,
-		NIPQUAD(c3cn->daddr.sin_addr.s_addr));
+	sprintf(conn->portal_address, "%pI4", &c3cn->daddr.sin_addr.s_addr);
 	conn->portal_port = ntohs(c3cn->daddr.sin_port);
 	spin_unlock_bh(&conn->session->lock);
 
@@ -753,7 +752,7 @@ static int cxgb3i_host_get_param(struct Scsi_Host *shost,
 		__be32 addr;
 
 		addr = cxgb3i_get_private_ipv4addr(hba->ndev);
-		len = sprintf(buf, NIPQUAD_FMT, NIPQUAD(addr));
+		len = sprintf(buf, "%pI4", &addr);
 		break;
 	}
 	default:
diff --git a/drivers/scsi/cxgb3i/cxgb3i_offload.c b/drivers/scsi/cxgb3i/cxgb3i_offload.c
index 26ffdcd..edef61c 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_offload.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c
@@ -1643,10 +1643,11 @@ int cxgb3i_c3cn_connect(struct net_device *dev, struct s3_conn *c3cn,
 	} else
 		c3cn->saddr.sin_addr.s_addr = sipv4;
 
-	c3cn_conn_debug("c3cn 0x%p, %u.%u.%u.%u,%u-%u.%u.%u.%u,%u SYN_SENT.\n",
-			c3cn, NIPQUAD(c3cn->saddr.sin_addr.s_addr),
+	c3cn_conn_debug("c3cn 0x%p, %pI4,%u-%pI4,%u SYN_SENT.\n",
+			c3cn,
+			&c3cn->saddr.sin_addr.s_addr,
 			ntohs(c3cn->saddr.sin_port),
-			NIPQUAD(c3cn->daddr.sin_addr.s_addr),
+			&c3cn->daddr.sin_addr.s_addr,
 			ntohs(c3cn->daddr.sin_port));
 
 	c3cn_set_state(c3cn, C3CN_STATE_CONNECTING);
-- 
1.6.6.rc0.57.gad7a

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-06  1:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06  1:20 [PATCH 0/8] Remove most uses of NIPQUAD and NIPQUAD_FMT Joe Perches
2010-01-06  1:20 ` [PATCH 1/8] drivers/scsi: Remove uses of NIPQUAD, use %pI4 Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).