[PATCH 03/33] staging: vc04_services: Remove REMOTE_EVENT_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>
---
 .../interface/vchiq_arm/vchiq_2835_arm.c           |  2 +-
 .../vc04_services/interface/vchiq_arm/vchiq_core.c |  9 +++++----
 .../vc04_services/interface/vchiq_arm/vchiq_core.h | 14 +++++++-------
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index 5601d167ac60..76e87cda130c 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -234,7 +234,7 @@ vchiq_platform_get_arm_state(VCHIQ_STATE_T *state)
 }
 
 void
-remote_event_signal(REMOTE_EVENT_T *event)
+remote_event_signal(struct remote_event_struct *event)
 {
 	wmb();
 
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 5ee667d46eb5..af5ce7c8600a 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -418,7 +418,7 @@ vchiq_set_conn_state(VCHIQ_STATE_T *state, VCHIQ_CONNSTATE_T newstate)
 }
 
 static inline void
-remote_event_create(REMOTE_EVENT_T *event)
+remote_event_create(struct remote_event_struct *event)
 {
 	event->armed = 0;
 	/* Don't clear the 'fired' flag because it may already have been set
@@ -426,7 +426,7 @@ remote_event_create(REMOTE_EVENT_T *event)
 }
 
 static inline int
-remote_event_wait(VCHIQ_STATE_T *state, REMOTE_EVENT_T *event)
+remote_event_wait(VCHIQ_STATE_T *state, struct remote_event_struct *event)
 {
 	if (!event->fired) {
 		event->armed = 1;
@@ -448,14 +448,15 @@ remote_event_wait(VCHIQ_STATE_T *state, REMOTE_EVENT_T *event)
 }
 
 static inline void
-remote_event_signal_local(VCHIQ_STATE_T *state, REMOTE_EVENT_T *event)
+remote_event_signal_local(VCHIQ_STATE_T *state,
+			  struct remote_event_struct *event)
 {
 	event->armed = 0;
 	complete((struct completion *)((char *)state + event->event));
 }
 
 static inline void
-remote_event_poll(VCHIQ_STATE_T *state, REMOTE_EVENT_T *event)
+remote_event_poll(VCHIQ_STATE_T *state, struct remote_event_struct *event)
 {
 	if (event->fired && event->armed)
 		remote_event_signal_local(state, event);
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 b76281f7510e..a3db277fc9e1 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -259,12 +259,12 @@ typedef struct vchiq_bulk_queue_struct {
 	VCHIQ_BULK_T bulks[VCHIQ_NUM_SERVICE_BULKS];
 } VCHIQ_BULK_QUEUE_T;
 
-typedef struct remote_event_struct {
+struct remote_event_struct {
 	int armed;
 	int fired;
 	/* Contains offset from the beginning of the VCHIQ_STATE_T structure */
 	u32 event;
-} REMOTE_EVENT_T;
+};
 
 typedef struct opaque_platform_state_t *VCHIQ_PLATFORM_STATE_T;
 
@@ -355,7 +355,7 @@ typedef struct vchiq_shared_state_struct {
 
 	/* Signalling this event indicates that owner's slot handler thread
 	** should run. */
-	REMOTE_EVENT_T trigger;
+	struct remote_event_struct trigger;
 
 	/* Indicates the byte position within the stream where the next message
 	** will be written. The least significant bits are an index into the
@@ -363,17 +363,17 @@ typedef struct vchiq_shared_state_struct {
 	int tx_pos;
 
 	/* This event should be signalled when a slot is recycled. */
-	REMOTE_EVENT_T recycle;
+	struct remote_event_struct recycle;
 
 	/* The slot_queue index where the next recycled slot will be written. */
 	int slot_queue_recycle;
 
 	/* This event should be signalled when a synchronous message is sent. */
-	REMOTE_EVENT_T sync_trigger;
+	struct remote_event_struct sync_trigger;
 
 	/* This event should be signalled when a synchronous message has been
 	** released. */
-	REMOTE_EVENT_T sync_release;
+	struct remote_event_struct sync_release;
 
 	/* A circular buffer of slot indexes. */
 	int slot_queue[VCHIQ_MAX_SLOTS_PER_SIDE];
@@ -623,7 +623,7 @@ extern void
 vchiq_complete_bulk(VCHIQ_BULK_T *bulk);
 
 extern void
-remote_event_signal(REMOTE_EVENT_T *event);
+remote_event_signal(struct remote_event_struct *event);
 
 void
 vchiq_platform_check_suspend(VCHIQ_STATE_T *state);
-- 
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