Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 2015 06:56:22 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r288693 - stable/10/sys/cam/scsi
Message-ID:  <201510050656.t956uMJ2063041@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Oct  5 06:56:22 2015
New Revision: 288693
URL: https://svnweb.freebsd.org/changeset/base/288693

Log:
  MFC r270225 (by jhb): Unexpand TAILQ_FOREACH().

Modified:
  stable/10/sys/cam/scsi/scsi_low.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/scsi/scsi_low.c
==============================================================================
--- stable/10/sys/cam/scsi/scsi_low.c	Mon Oct  5 06:55:26 2015	(r288692)
+++ stable/10/sys/cam/scsi/scsi_low.c	Mon Oct  5 06:56:22 2015	(r288693)
@@ -326,15 +326,13 @@ scsi_low_find_ccb(slp, target, lun, osde
 	if ((cb = slp->sl_Qnexus) != NULL && cb->osdep == osdep)
 		return cb;
 
-	for (cb = TAILQ_FIRST(&slp->sl_start); cb != NULL;
-	     cb = TAILQ_NEXT(cb, ccb_chain))
+	TAILQ_FOREACH(cb, &slp->sl_start, ccb_chain)
 	{
 		if (cb->osdep == osdep)
 			return cb;
 	}
 
-	for (cb = TAILQ_FIRST(&li->li_discq); cb != NULL;
-	     cb = TAILQ_NEXT(cb, ccb_chain))
+	TAILQ_FOREACH(cb, &li->li_discq, ccb_chain)
 	{
 		if (cb->osdep == osdep)
 			return cb;
@@ -4184,8 +4182,7 @@ scsi_low_info(slp, ti, s)
 	printf(">>>>> SCSI_LOW_INFO(0x%lx): %s\n", (u_long) slp->sl_Tnexus, s);
 	if (ti == NULL)
 	{
-		for (ti = TAILQ_FIRST(&slp->sl_titab); ti != NULL;
-		     ti = TAILQ_NEXT(ti, ti_chain))
+		TAILQ_FOREACH(ti, &slp->sl_titab, ti_chain)
 		{
 			scsi_low_print(slp, ti);
 		}



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