staging: vchiq_core: introduce defines for retry_poll
authorStefan Wahren <stefan.wahren@i2se.com>
Sat, 15 May 2021 19:13:50 +0000 (21:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 15:56:45 +0000 (17:56 +0200)
Use descriptive defines instead of a number with a comment.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1621106030-30363-1-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

index c22eefc26da7daa1df507756978f78826909fe06..47bb0afd6b84273515ab4caece313170060a4dc6 100644 (file)
@@ -41,6 +41,9 @@
 #define NO_CLOSE_RECVD 0
 #define CLOSE_RECVD    1
 
+#define NO_RETRY_POLL  0
+#define RETRY_POLL     1
+
 struct vchiq_open_payload {
        int fourcc;
        int client_id;
@@ -1366,11 +1369,9 @@ poll_services_of_group(struct vchiq_state *state, int group)
                                             VCHIQ_POLL_TERMINATE);
                }
                if (service_flags & BIT(VCHIQ_POLL_TXNOTIFY))
-                       notify_bulks(service, &service->bulk_tx,
-                                    1/*retry_poll*/);
+                       notify_bulks(service, &service->bulk_tx, RETRY_POLL);
                if (service_flags & BIT(VCHIQ_POLL_RXNOTIFY))
-                       notify_bulks(service, &service->bulk_rx,
-                                    1/*retry_poll*/);
+                       notify_bulks(service, &service->bulk_rx, RETRY_POLL);
                unlock_service(service);
        }
 }
@@ -1794,7 +1795,7 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header)
                        queue->process++;
                        mutex_unlock(&service->bulk_mutex);
                        DEBUG_TRACE(PARSE_LINE);
-                       notify_bulks(service, queue, 1/*retry_poll*/);
+                       notify_bulks(service, queue, RETRY_POLL);
                        DEBUG_TRACE(PARSE_LINE);
                }
                break;
@@ -2650,11 +2651,11 @@ do_abort_bulks(struct vchiq_service *service)
        abort_outstanding_bulks(service, &service->bulk_rx);
        mutex_unlock(&service->bulk_mutex);
 
-       status = notify_bulks(service, &service->bulk_tx, 0/*!retry_poll*/);
+       status = notify_bulks(service, &service->bulk_tx, NO_RETRY_POLL);
        if (status != VCHIQ_SUCCESS)
                return 0;
 
-       status = notify_bulks(service, &service->bulk_rx, 0/*!retry_poll*/);
+       status = notify_bulks(service, &service->bulk_rx, NO_RETRY_POLL);
        return (status == VCHIQ_SUCCESS);
 }