diff options
author | Warner Losh <imp@FreeBSD.org> | 2020-03-11 00:00:03 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2020-03-11 00:00:03 +0000 |
commit | 5870223ddcc43ab05b3ecc1b6a3f74f11f421ee2 (patch) | |
tree | dcdec74f2ba088aad1aff76b2aa18f1c9e9968f6 /sys/cam | |
parent | 3dfb13c1cdc7357ebb71387cc87a9133468a6ea1 (diff) | |
download | src-5870223ddcc43ab05b3ecc1b6a3f74f11f421ee2.tar.gz src-5870223ddcc43ab05b3ecc1b6a3f74f11f421ee2.zip |
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
Notes
Notes:
svn path=/head/; revision=358865
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_queue.c | 24 | ||||
-rw-r--r-- | sys/cam/cam_queue.h | 12 |
2 files changed, 0 insertions, 36 deletions
diff --git a/sys/cam/cam_queue.c b/sys/cam/cam_queue.c index a700195b819f..34297030c289 100644 --- a/sys/cam/cam_queue.c +++ b/sys/cam/cam_queue.c @@ -54,21 +54,6 @@ static void heap_up(cam_pinfo **queue_array, int new_index); 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) { @@ -97,15 +82,6 @@ camq_init(struct camq *camq, int size) * 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) { if (queue->queue_array != NULL) { diff --git a/sys/cam/cam_queue.h b/sys/cam/cam_queue.h index b6a86783ebc5..8393c77972f4 100644 --- a/sys/cam/cam_queue.h +++ b/sys/cam/cam_queue.h @@ -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); @@ -117,13 +112,6 @@ u_int32_t camq_resize(struct camq *queue, int new_size); 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. */ void camq_fini(struct camq *queue); |