Commit a24ac57e authored by Nicolas Saenz Julienne's avatar Nicolas Saenz Julienne Committed by Greg Kroah-Hartman

staging: vchi: Get rid of flags argument in vchi_msg_hold()

All users are ignoring the flags argument. So for the sake of
simplicity delete it.
Signed-off-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-19-nsaenzjulienne@suse.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 115588bf
...@@ -102,8 +102,7 @@ static void audio_vchi_callback(void *param, ...@@ -102,8 +102,7 @@ static void audio_vchi_callback(void *param,
if (reason != VCHI_CALLBACK_MSG_AVAILABLE) if (reason != VCHI_CALLBACK_MSG_AVAILABLE)
return; return;
status = vchi_msg_hold(instance->service, (void **)&m, &size, status = vchi_msg_hold(instance->service, (void **)&m, &size, &handle);
VCHI_FLAGS_NONE, &handle);
if (status) if (status)
return; return;
......
...@@ -87,7 +87,6 @@ extern int vchi_queue_kernel_message(struct vchi_service *service, void *data, ...@@ -87,7 +87,6 @@ extern int vchi_queue_kernel_message(struct vchi_service *service, void *data,
extern int32_t vchi_msg_hold(struct vchi_service *service, extern int32_t vchi_msg_hold(struct vchi_service *service,
void **data, // } may be NULL, as info can be void **data, // } may be NULL, as info can be
uint32_t *msg_size, // } obtained from HELD_MSG_T uint32_t *msg_size, // } obtained from HELD_MSG_T
enum vchi_flags flags,
struct vchi_held_msg *message_descriptor); struct vchi_held_msg *message_descriptor);
/******************************************************************************* /*******************************************************************************
......
...@@ -195,7 +195,6 @@ EXPORT_SYMBOL(vchi_held_msg_release); ...@@ -195,7 +195,6 @@ EXPORT_SYMBOL(vchi_held_msg_release);
* Arguments: struct vchi_service *service, * Arguments: struct vchi_service *service,
* void **data, * void **data,
* uint32_t *msg_size, * uint32_t *msg_size,
* enum vchi_flags flags,
* struct vchi_held_msg *message_handle * struct vchi_held_msg *message_handle
* *
* Description: Routine to return a pointer to the current message (to allow * Description: Routine to return a pointer to the current message (to allow
...@@ -207,17 +206,12 @@ EXPORT_SYMBOL(vchi_held_msg_release); ...@@ -207,17 +206,12 @@ EXPORT_SYMBOL(vchi_held_msg_release);
* *
***********************************************************/ ***********************************************************/
int32_t vchi_msg_hold(struct vchi_service *service, void **data, int32_t vchi_msg_hold(struct vchi_service *service, void **data,
uint32_t *msg_size, enum vchi_flags flags, uint32_t *msg_size, struct vchi_held_msg *message_handle)
struct vchi_held_msg *message_handle)
{ {
struct vchiq_header *header; struct vchiq_header *header;
WARN_ON((flags != VCHI_FLAGS_NONE) && if (vchiu_queue_is_empty(&service->queue))
(flags != VCHI_FLAGS_BLOCK_UNTIL_OP_COMPLETE)); return -1;
if (flags == VCHI_FLAGS_NONE)
if (vchiu_queue_is_empty(&service->queue))
return -1;
header = vchiu_queue_pop(&service->queue); header = vchiu_queue_pop(&service->queue);
......
...@@ -568,7 +568,7 @@ static void service_callback(void *param, ...@@ -568,7 +568,7 @@ static void service_callback(void *param,
switch (reason) { switch (reason) {
case VCHI_CALLBACK_MSG_AVAILABLE: case VCHI_CALLBACK_MSG_AVAILABLE:
status = vchi_msg_hold(instance->service, (void **)&msg, status = vchi_msg_hold(instance->service, (void **)&msg,
&msg_len, VCHI_FLAGS_NONE, &msg_handle); &msg_len, &msg_handle);
if (status) { if (status) {
pr_err("Unable to dequeue a message (%d)\n", status); pr_err("Unable to dequeue a message (%d)\n", status);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment