Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 13:42:41 +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-8@freebsd.org
Subject:   svn commit: r237304 - stable/8/sys/cam
Message-ID:  <201206201342.q5KDgf4S045206@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Jun 20 13:42:40 2012
New Revision: 237304
URL: http://svn.freebsd.org/changeset/base/237304

Log:
  MFC r236605:
  Replace #ifdef CAMDEBUG + if + panic() with single KASSERT().

Modified:
  stable/8/sys/cam/cam_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/cam/cam_xpt.c
==============================================================================
--- stable/8/sys/cam/cam_xpt.c	Wed Jun 20 13:41:20 2012	(r237303)
+++ stable/8/sys/cam/cam_xpt.c	Wed Jun 20 13:42:40 2012	(r237304)
@@ -3179,13 +3179,8 @@ xpt_run_dev_allocq(struct cam_eb *bus)
 				("running device %p\n", device));
 
 		drvq = &device->drvq;
-
-#ifdef CAMDEBUG
-		if (drvq->entries <= 0) {
-			panic("xpt_run_dev_allocq: "
-			      "Device on queue without any work to do");
-		}
-#endif
+		KASSERT(drvq->entries > 0, ("xpt_run_dev_allocq: "
+		    "Device on queue without any work to do"));
 		if ((work_ccb = xpt_get_ccb(device)) != NULL) {
 			devq->alloc_openings--;
 			devq->alloc_active++;



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