From owner-svn-src-all@FreeBSD.ORG Thu Oct 22 21:07:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6A93106566B; Thu, 22 Oct 2009 21:07:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5F6B8FC0A; Thu, 22 Oct 2009 21:07:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9ML7WmB040207; Thu, 22 Oct 2009 21:07:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9ML7WOW040203; Thu, 22 Oct 2009 21:07:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200910222107.n9ML7WOW040203@svn.freebsd.org> From: Alexander Motin Date: Thu, 22 Oct 2009 21:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198377 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 21:07:33 -0000 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); }