svn commit: r237303 - stable/9/sys/cam

Alexander Motin mav at FreeBSD.org
Wed Jun 20 13:41:21 UTC 2012


Author: mav
Date: Wed Jun 20 13:41:20 2012
New Revision: 237303
URL: http://svn.freebsd.org/changeset/base/237303

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

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

Modified: stable/9/sys/cam/cam_xpt.c
==============================================================================
--- stable/9/sys/cam/cam_xpt.c	Wed Jun 20 12:46:27 2012	(r237302)
+++ stable/9/sys/cam/cam_xpt.c	Wed Jun 20 13:41:20 2012	(r237303)
@@ -3226,13 +3226,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++;


More information about the svn-src-stable-9 mailing list