staging: vchi: Get rid of flags argument in vchi_msg_hold()
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Mon, 29 Jun 2020 15:09:16 +0000 (17:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Jul 2020 13:47:04 +0000 (15:47 +0200)
All users are ignoring the flags argument. So for the sake of
simplicity delete it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Link: https://lore.kernel.org/r/20200629150945.10720-19-nsaenzjulienne@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
drivers/staging/vc04_services/interface/vchi/vchi.h
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

index 5018b5b..6811924 100644 (file)
@@ -102,8 +102,7 @@ static void audio_vchi_callback(void *param,
        if (reason != VCHI_CALLBACK_MSG_AVAILABLE)
                return;
 
-       status = vchi_msg_hold(instance->service, (void **)&m, &size,
-                              VCHI_FLAGS_NONE, &handle);
+       status = vchi_msg_hold(instance->service, (void **)&m, &size, &handle);
        if (status)
                return;
 
index 55e51e5..92ce811 100644 (file)
@@ -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,
                             void **data,        // } may be NULL, as info can be
                             uint32_t *msg_size, // } obtained from HELD_MSG_T
-                            enum vchi_flags flags,
                             struct vchi_held_msg *message_descriptor);
 
 /*******************************************************************************
index 53e0357..6c48d9e 100644 (file)
@@ -195,7 +195,6 @@ EXPORT_SYMBOL(vchi_held_msg_release);
  * Arguments:  struct vchi_service *service,
  *             void **data,
  *             uint32_t *msg_size,
- *             enum vchi_flags flags,
  *             struct vchi_held_msg *message_handle
  *
  * Description: Routine to return a pointer to the current message (to allow
@@ -207,17 +206,12 @@ EXPORT_SYMBOL(vchi_held_msg_release);
  *
  ***********************************************************/
 int32_t vchi_msg_hold(struct vchi_service *service, void **data,
-                     uint32_t *msg_size, enum vchi_flags flags,
-                     struct vchi_held_msg *message_handle)
+                     uint32_t *msg_size, struct vchi_held_msg *message_handle)
 {
        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;
+       if (vchiu_queue_is_empty(&service->queue))
+               return -1;
 
        header = vchiu_queue_pop(&service->queue);
 
index 075dcf4..b63d4f5 100644 (file)
@@ -568,7 +568,7 @@ static void service_callback(void *param,
        switch (reason) {
        case VCHI_CALLBACK_MSG_AVAILABLE:
                status = vchi_msg_hold(instance->service, (void **)&msg,
-                                      &msg_len, VCHI_FLAGS_NONE, &msg_handle);
+                                      &msg_len, &msg_handle);
                if (status) {
                        pr_err("Unable to dequeue a message (%d)\n", status);
                        break;