Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2012 10:23:41 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236605 - head/sys/cam
Message-ID:  <201206051023.q55ANfud004431@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jun  5 10:23:41 2012
New Revision: 236605
URL: http://svn.freebsd.org/changeset/base/236605

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

Modified:
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c	Tue Jun  5 10:08:22 2012	(r236604)
+++ head/sys/cam/cam_xpt.c	Tue Jun  5 10:23:41 2012	(r236605)
@@ -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++;



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