staging: vchi: Get rid of vchi_msg_dequeue()
Nobody uses it. Get rid of it. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-15-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b74a8932df
commit
6cdd7b7953
@ -93,13 +93,6 @@ extern int32_t vchi_service_release(struct vchi_service *service);
|
||||
extern int vchi_queue_kernel_message(struct vchi_service *service, void *data,
|
||||
unsigned int size);
|
||||
|
||||
// Routine to receive a msg from a service
|
||||
// Dequeue is equivalent to hold, copy into client buffer, release
|
||||
extern int32_t vchi_msg_dequeue(struct vchi_service *service, void *data,
|
||||
uint32_t max_data_size_to_read,
|
||||
uint32_t *actual_msg_size,
|
||||
enum vchi_flags flags);
|
||||
|
||||
// Routine to look at a message in place.
|
||||
// The message is dequeued, so the caller is left holding it; the descriptor is
|
||||
// filled in and must be released when the user has finished with the message.
|
||||
|
@ -160,45 +160,6 @@ int32_t vchi_bulk_queue_transmit(struct vchi_service *service,
|
||||
}
|
||||
EXPORT_SYMBOL(vchi_bulk_queue_transmit);
|
||||
|
||||
/***********************************************************
|
||||
* Name: vchi_msg_dequeue
|
||||
*
|
||||
* Arguments: struct vchi_service *service,
|
||||
* void *data,
|
||||
* uint32_t max_data_size_to_read,
|
||||
* uint32_t *actual_msg_size
|
||||
* enum vchi_flags flags
|
||||
*
|
||||
* Description: Routine to dequeue a message into the supplied buffer
|
||||
*
|
||||
* Returns: int32_t - success == 0
|
||||
*
|
||||
***********************************************************/
|
||||
int32_t vchi_msg_dequeue(struct vchi_service *service, void *data,
|
||||
uint32_t max_data_size_to_read,
|
||||
uint32_t *actual_msg_size, enum vchi_flags flags)
|
||||
{
|
||||
struct vchiq_header *header;
|
||||
|
||||
WARN_ON((flags != VCHI_FLAGS_NONE) &&
|
||||
(flags != VCHI_FLAGS_BLOCK_UNTIL_OP_COMPLETE));
|
||||
|
||||
if (flags == VCHI_FLAGS_NONE)
|
||||
if (vchiu_queue_is_empty(&service->queue))
|
||||
return -1;
|
||||
|
||||
header = vchiu_queue_pop(&service->queue);
|
||||
|
||||
memcpy(data, header->data, header->size < max_data_size_to_read ?
|
||||
header->size : max_data_size_to_read);
|
||||
|
||||
*actual_msg_size = header->size;
|
||||
|
||||
vchiq_release_message(service->handle, header);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(vchi_msg_dequeue);
|
||||
|
||||
/***********************************************************
|
||||
* Name: vchi_held_msg_release
|
||||
|
Loading…
x
Reference in New Issue
Block a user