Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Nov 2014 11:15:52 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274036 - in head/sys: cam/ctl dev/iscsi
Message-ID:  <201411031115.sA3BFqjr038656@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Mon Nov  3 11:15:51 2014
New Revision: 274036
URL: https://svnweb.freebsd.org/changeset/base/274036

Log:
  s/icl_pdu_new_bhs/icl_pdu_new/; no functional changes, just a little
  nicer code.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/cam/ctl/ctl_frontend_iscsi.c
  head/sys/dev/iscsi/icl.c
  head/sys/dev/iscsi/icl.h
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- head/sys/cam/ctl/ctl_frontend_iscsi.c	Mon Nov  3 11:11:45 2014	(r274035)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.c	Mon Nov  3 11:15:51 2014	(r274036)
@@ -187,7 +187,7 @@ static struct icl_pdu *
 cfiscsi_pdu_new_response(struct icl_pdu *request, int flags)
 {
 
-	return (icl_pdu_new_bhs(request->ip_conn, flags));
+	return (icl_pdu_new(request->ip_conn, flags));
 }
 
 static bool
@@ -1040,7 +1040,7 @@ cfiscsi_callout(void *context)
 	if (cs->cs_timeout < 2)
 		return;
 
-	cp = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT);
+	cp = icl_pdu_new(cs->cs_conn, M_NOWAIT);
 	if (cp == NULL) {
 		CFISCSI_SESSION_WARN(cs, "failed to allocate memory");
 		return;
@@ -1643,7 +1643,7 @@ cfiscsi_ioctl_terminate(struct ctl_iscsi
 		    strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0)
 			continue;
 
-		response = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT);
+		response = icl_pdu_new(cs->cs_conn, M_NOWAIT);
 		if (response == NULL) {
 			/*
 			 * Oh well.  Just terminate the connection.
@@ -1693,7 +1693,7 @@ cfiscsi_ioctl_logout(struct ctl_iscsi *c
 		    strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0)
 			continue;
 
-		response = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT);
+		response = icl_pdu_new(cs->cs_conn, M_NOWAIT);
 		if (response == NULL) {
 			ci->status = CTL_ISCSI_ERROR;
 			snprintf(ci->error_str, sizeof(ci->error_str),
@@ -1863,7 +1863,7 @@ cfiscsi_ioctl_send(struct ctl_iscsi *ci)
 		}
 	}
 
-	ip = icl_pdu_new_bhs(cs->cs_conn, M_WAITOK);
+	ip = icl_pdu_new(cs->cs_conn, M_WAITOK);
 	memcpy(ip->ip_bhs, cisp->bhs, sizeof(*ip->ip_bhs));
 	if (datalen > 0) {
 		icl_pdu_append_data(ip, data, datalen, M_WAITOK);

Modified: head/sys/dev/iscsi/icl.c
==============================================================================
--- head/sys/dev/iscsi/icl.c	Mon Nov  3 11:11:45 2014	(r274035)
+++ head/sys/dev/iscsi/icl.c	Mon Nov  3 11:15:51 2014	(r274036)
@@ -188,7 +188,7 @@ icl_pdu_free(struct icl_pdu *ip)
  * Allocate icl_pdu with empty BHS to fill up by the caller.
  */
 struct icl_pdu *
-icl_pdu_new_bhs(struct icl_conn *ic, int flags)
+icl_pdu_new(struct icl_conn *ic, int flags)
 {
 	struct icl_pdu *ip;
 

Modified: head/sys/dev/iscsi/icl.h
==============================================================================
--- head/sys/dev/iscsi/icl.h	Mon Nov  3 11:11:45 2014	(r274035)
+++ head/sys/dev/iscsi/icl.h	Mon Nov  3 11:15:51 2014	(r274036)
@@ -57,7 +57,7 @@ struct icl_pdu {
 	uint32_t		ip_prv2;
 };
 
-struct icl_pdu		*icl_pdu_new_bhs(struct icl_conn *ic, int flags);
+struct icl_pdu		*icl_pdu_new(struct icl_conn *ic, int flags);
 size_t			icl_pdu_data_segment_length(const struct icl_pdu *ip);
 int			icl_pdu_append_data(struct icl_pdu *ip, const void *addr, size_t len, int flags);
 void			icl_pdu_get_data(struct icl_pdu *ip, size_t off, void *addr, size_t len);

Modified: head/sys/dev/iscsi/iscsi.c
==============================================================================
--- head/sys/dev/iscsi/iscsi.c	Mon Nov  3 11:11:45 2014	(r274035)
+++ head/sys/dev/iscsi/iscsi.c	Mon Nov  3 11:15:51 2014	(r274036)
@@ -266,7 +266,7 @@ iscsi_session_logout(struct iscsi_sessio
 	struct icl_pdu *request;
 	struct iscsi_bhs_logout_request *bhslr;
 
-	request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT);
+	request = icl_pdu_new(is->is_conn, M_NOWAIT);
 	if (request == NULL)
 		return;
 
@@ -585,7 +585,7 @@ iscsi_callout(void *context)
 	if (is->is_timeout < 2)
 		return;
 
-	request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT);
+	request = icl_pdu_new(is->is_conn, M_NOWAIT);
 	if (request == NULL) {
 		ISCSI_SESSION_WARN(is, "failed to allocate PDU");
 		return;
@@ -789,7 +789,7 @@ iscsi_pdu_handle_nop_in(struct icl_pdu *
 		icl_pdu_get_data(response, 0, data, datasize);
 	}
 
-	request = icl_pdu_new_bhs(response->ip_conn, M_NOWAIT);
+	request = icl_pdu_new(response->ip_conn, M_NOWAIT);
 	if (request == NULL) {
 		ISCSI_SESSION_WARN(is, "failed to allocate memory; "
 		    "reconnecting");
@@ -1150,7 +1150,7 @@ iscsi_pdu_handle_r2t(struct icl_pdu *res
 			return;
 		}
 
-		request = icl_pdu_new_bhs(response->ip_conn, M_NOWAIT);
+		request = icl_pdu_new(response->ip_conn, M_NOWAIT);
 		if (request == NULL) {
 			icl_pdu_free(response);
 			iscsi_session_reconnect(is);
@@ -1554,7 +1554,7 @@ iscsi_ioctl_daemon_send(struct iscsi_sof
 		}
 	}
 
-	ip = icl_pdu_new_bhs(is->is_conn, M_WAITOK);
+	ip = icl_pdu_new(is->is_conn, M_WAITOK);
 	memcpy(ip->ip_bhs, ids->ids_bhs, sizeof(*ip->ip_bhs));
 	if (datalen > 0) {
 		error = icl_pdu_append_data(ip, data, datalen, M_WAITOK);
@@ -2004,7 +2004,7 @@ iscsi_action_abort(struct iscsi_session 
 		return;
 	}
 
-	request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT);
+	request = icl_pdu_new(is->is_conn, M_NOWAIT);
 	if (request == NULL) {
 		ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
 		xpt_done(ccb);
@@ -2058,7 +2058,7 @@ iscsi_action_scsiio(struct iscsi_session
 	}
 #endif
 
-	request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT);
+	request = icl_pdu_new(is->is_conn, M_NOWAIT);
 	if (request == NULL) {
 		if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) {
 			xpt_freeze_devq(ccb->ccb_h.path, 1);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411031115.sA3BFqjr038656>