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
This commit is contained in:
parent
3dfb13c1cd
commit
5870223ddc
@ -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)
|
||||
{
|
||||
@ -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)
|
||||
{
|
||||
|
@ -101,11 +101,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
|
||||
*/
|
||||
@ -116,13 +111,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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user