From owner-svn-src-head@freebsd.org Wed Mar 11 00:00:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3E1C274034; Wed, 11 Mar 2020 00:00:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48cXC83jq7z41js; Wed, 11 Mar 2020 00:00:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 715E63AB8; Wed, 11 Mar 2020 00:00:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02B004dF057384; Wed, 11 Mar 2020 00:00:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02B004to057383; Wed, 11 Mar 2020 00:00:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003110000.02B004to057383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 11 Mar 2020 00:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358865 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358865 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2020 00:00:04 -0000 Author: imp Date: Wed Mar 11 00:00:03 2020 New Revision: 358865 URL: https://svnweb.freebsd.org/changeset/base/358865 Log: Eliminate camq_alloc() and camq_free() These are no longer needed now that it's embedded in cam_ccbq. They are also unused. Reviewed by: ken, chuck Differential Revision: https://reviews.freebsd.org/D24008 Modified: head/sys/cam/cam_queue.c head/sys/cam/cam_queue.h Modified: head/sys/cam/cam_queue.c ============================================================================== --- head/sys/cam/cam_queue.c Tue Mar 10 23:59:58 2020 (r358864) +++ head/sys/cam/cam_queue.c Wed Mar 11 00:00:03 2020 (r358865) @@ -54,21 +54,6 @@ static void heap_up(cam_pinfo **queue_array, int new_i static void heap_down(cam_pinfo **queue_array, int index, int last_index); -struct camq * -camq_alloc(int size) -{ - struct camq *camq; - - camq = (struct camq *)malloc(sizeof(*camq), M_CAMQ, M_NOWAIT); - if (camq != NULL) { - if (camq_init(camq, size) != 0) { - free(camq, M_CAMQ); - camq = NULL; - } - } - return (camq); -} - int camq_init(struct camq *camq, int size) { @@ -96,15 +81,6 @@ camq_init(struct camq *camq, int size) * obtained a camq structure. The XPT should ensure that the queue * is empty before calling this routine. */ -void -camq_free(struct camq *queue) -{ - if (queue != NULL) { - camq_fini(queue); - free(queue, M_CAMQ); - } -} - void camq_fini(struct camq *queue) { Modified: head/sys/cam/cam_queue.h ============================================================================== --- head/sys/cam/cam_queue.h Tue Mar 10 23:59:58 2020 (r358864) +++ head/sys/cam/cam_queue.h Wed Mar 11 00:00:03 2020 (r358865) @@ -102,11 +102,6 @@ void cam_ccbq_free(struct cam_ccbq *ccbq); void cam_ccbq_fini(struct cam_ccbq *ccbq); /* - * Allocate and initialize a cam_queue structure. - */ -struct camq *camq_alloc(int size); - -/* * Resize a cam queue */ u_int32_t camq_resize(struct camq *queue, int new_size); @@ -115,13 +110,6 @@ u_int32_t camq_resize(struct camq *queue, int new_size * Initialize a camq structure. Return 0 on success, 1 on failure. */ int camq_init(struct camq *camq, int size); - -/* - * Free a cam_queue structure. This should only be called if a controller - * driver failes somehow during its attach routine or is unloaded and has - * obtained a cam_queue structure. - */ -void camq_free(struct camq *queue); /* * Finialize any internal storage or state of a cam_queue.