svn commit: r358865 - head/sys/cam
Warner Losh
imp at FreeBSD.org
Wed Mar 11 00:00:04 UTC 2020
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.
More information about the svn-src-all
mailing list