[PATCH 11/33] staging: vc04_services: Remove VCHIQ_BULK_QUEUE_T typedef

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

 



Typedefing structs is not encouraged in the kernel.

The removal of typedefs was requested in interface/vchi/TODO in commit
7626e002225a4c1b9455689b1f22909dfeff43ca.

Signed-off-by: Dominic Braun <inf.braun@xxxxxx>
Signed-off-by: Tobias Büttner <tobias.buettner@xxxxxx>
---
 .../vc04_services/interface/vchiq_arm/vchiq_core.c  | 13 +++++++------
 .../vc04_services/interface/vchiq_arm/vchiq_core.h  |  8 ++++----
 2 files changed, 11 insertions(+), 10 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 af5ce7c8600a..851328faa480 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -1206,8 +1206,8 @@ release_slot(VCHIQ_STATE_T *state, VCHIQ_SLOT_INFO_T *slot_info,
 
 /* Called by the slot handler - don't hold the bulk mutex */
 static VCHIQ_STATUS_T
-notify_bulks(VCHIQ_SERVICE_T *service, VCHIQ_BULK_QUEUE_T *queue,
-	int retry_poll)
+notify_bulks(VCHIQ_SERVICE_T *service, struct vchiq_bulk_queue_struct *queue,
+	     int retry_poll)
 {
 	VCHIQ_STATUS_T status = VCHIQ_SUCCESS;
 
@@ -1357,7 +1357,8 @@ poll_services(VCHIQ_STATE_T *state)
 
 /* Called with the bulk_mutex held */
 static void
-abort_outstanding_bulks(VCHIQ_SERVICE_T *service, VCHIQ_BULK_QUEUE_T *queue)
+abort_outstanding_bulks(VCHIQ_SERVICE_T *service,
+			struct vchiq_bulk_queue_struct *queue)
 {
 	int is_tx = (queue == &service->bulk_tx);
 
@@ -1736,7 +1737,7 @@ parse_rx_slots(VCHIQ_STATE_T *state)
 			if ((service->remoteport == remoteport)
 				&& (service->srvstate !=
 				VCHIQ_SRVSTATE_FREE)) {
-				VCHIQ_BULK_QUEUE_T *queue;
+				struct vchiq_bulk_queue_struct *queue;
 				VCHIQ_BULK_T *bulk;
 
 				queue = (type == VCHIQ_MSG_BULK_RX_DONE) ?
@@ -2093,7 +2094,7 @@ sync_func(void *v)
 }
 
 static void
-init_bulk_queue(VCHIQ_BULK_QUEUE_T *queue)
+init_bulk_queue(struct vchiq_bulk_queue_struct *queue)
 {
 	queue->local_insert = 0;
 	queue->remote_insert = 0;
@@ -3033,7 +3034,7 @@ VCHIQ_STATUS_T vchiq_bulk_transfer(VCHIQ_SERVICE_HANDLE_T handle,
 				   VCHIQ_BULK_DIR_T dir)
 {
 	VCHIQ_SERVICE_T *service = find_service_by_handle(handle);
-	VCHIQ_BULK_QUEUE_T *queue;
+	struct vchiq_bulk_queue_struct *queue;
 	VCHIQ_BULK_T *bulk;
 	VCHIQ_STATE_T *state;
 	struct bulk_waiter *bulk_waiter = NULL;
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index a3db277fc9e1..62a02b7cd165 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -249,7 +249,7 @@ typedef struct vchiq_bulk_struct {
 	int actual;
 } VCHIQ_BULK_T;
 
-typedef struct vchiq_bulk_queue_struct {
+struct vchiq_bulk_queue_struct {
 	int local_insert;  /* Where to insert the next local bulk */
 	int remote_insert; /* Where to insert the next remote bulk (master) */
 	int process;       /* Bulk to transfer next */
@@ -257,7 +257,7 @@ typedef struct vchiq_bulk_queue_struct {
 	int remove;        /* Bulk to notify the local client of, and remove,
 			   ** next */
 	VCHIQ_BULK_T bulks[VCHIQ_NUM_SERVICE_BULKS];
-} VCHIQ_BULK_QUEUE_T;
+};
 
 struct remote_event_struct {
 	int armed;
@@ -304,8 +304,8 @@ typedef struct vchiq_service_struct {
 
 	int service_use_count;
 
-	VCHIQ_BULK_QUEUE_T bulk_tx;
-	VCHIQ_BULK_QUEUE_T bulk_rx;
+	struct vchiq_bulk_queue_struct bulk_tx;
+	struct vchiq_bulk_queue_struct bulk_rx;
 
 	struct completion remove_event;
 	struct completion bulk_remove_event;
-- 
2.17.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [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