Date: Thu, 22 Oct 2009 21:07:32 +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: r198377 - head/sys/cam Message-ID: <200910222107.n9ML7WOW040203@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu Oct 22 21:07:32 2009 New Revision: 198377 URL: http://svn.freebsd.org/changeset/base/198377 Log: After thinking again, implement cam_ccbq_fini(). This is effectively NULL change, but makes this API a bit more consistent. Modified: head/sys/cam/cam_queue.c head/sys/cam/cam_queue.h head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_queue.c ============================================================================== --- head/sys/cam/cam_queue.c Thu Oct 22 21:01:41 2009 (r198376) +++ head/sys/cam/cam_queue.c Thu Oct 22 21:07:32 2009 (r198377) @@ -289,7 +289,7 @@ void cam_ccbq_free(struct cam_ccbq *ccbq) { if (ccbq) { - camq_fini(&ccbq->queue); + cam_ccbq_fini(ccbq); free(ccbq, M_CAMCCBQ); } } @@ -338,6 +338,13 @@ cam_ccbq_init(struct cam_ccbq *ccbq, int return (0); } +void +cam_ccbq_fini(struct cam_ccbq *ccbq) +{ + + camq_fini(&ccbq->queue); +} + /* * Heap routines for manipulating CAM queues. */ Modified: head/sys/cam/cam_queue.h ============================================================================== --- head/sys/cam/cam_queue.h Thu Oct 22 21:01:41 2009 (r198376) +++ head/sys/cam/cam_queue.h Thu Oct 22 21:07:32 2009 (r198377) @@ -96,6 +96,8 @@ int cam_ccbq_init(struct cam_ccbq *ccbq void cam_ccbq_free(struct cam_ccbq *ccbq); +void cam_ccbq_fini(struct cam_ccbq *ccbq); + /* * Allocate and initialize a cam_queue structure. */ Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Oct 22 21:01:41 2009 (r198376) +++ head/sys/cam/cam_xpt.c Thu Oct 22 21:07:32 2009 (r198377) @@ -4447,7 +4447,7 @@ xpt_release_device(struct cam_eb *bus, s devq = bus->sim->devq; cam_devq_resize(devq, devq->alloc_queue.array_size - 1); camq_fini(&device->drvq); - camq_fini(&device->ccbq.queue); + cam_ccbq_fini(&device->ccbq); free(device, M_CAMXPT); xpt_release_target(bus, target); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910222107.n9ML7WOW040203>