[PATCH 20/20] staging: vchiq_core: introduce defines for retry_poll

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use descriptive defines instead of a number with a comment.

Signed-off-by: Stefan Wahren <stefan.wahren@xxxxxxxx>
---
 .../vc04_services/interface/vchiq_arm/vchiq_core.c        | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index c22eefc..47bb0af 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -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);
 }
 
-- 
2.7.4





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux