[PATCH 28/33] staging: vc04_services: Remove VCHIQ_SHARED_STATE_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_core.c          | 26 +++++++++----------
 .../interface/vchiq_arm/vchiq_core.h          | 12 ++++-----
 2 files changed, 19 insertions(+), 19 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 7bf9893ed87a..17da7fd3bdd8 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -563,7 +563,7 @@ request_poll(VCHIQ_STATE_T *state, struct vchiq_service_struct *service,
 static struct vchiq_header_struct *
 reserve_space(VCHIQ_STATE_T *state, size_t space, int is_blocking)
 {
-	VCHIQ_SHARED_STATE_T *local = state->local;
+	struct vchiq_shared_state_struct *local = state->local;
 	int tx_pos = state->local_tx_pos;
 	int slot_space = VCHIQ_SLOT_SIZE - (tx_pos & VCHIQ_SLOT_MASK);
 
@@ -624,7 +624,7 @@ reserve_space(VCHIQ_STATE_T *state, size_t space, int is_blocking)
 static void
 process_free_queue(VCHIQ_STATE_T *state, BITSET_T *service_found, size_t length)
 {
-	VCHIQ_SHARED_STATE_T *local = state->local;
+	struct vchiq_shared_state_struct *local = state->local;
 	int slot_queue_available;
 
 	/* Find slots which have been freed by the other side, and return them
@@ -814,7 +814,7 @@ queue_message(VCHIQ_STATE_T *state, struct vchiq_service_struct *service,
 				       size_t offset, size_t maxsize),
 	      void *context, size_t size, int flags)
 {
-	VCHIQ_SHARED_STATE_T *local;
+	struct vchiq_shared_state_struct *local;
 	struct vchiq_service_quota_struct *service_quota = NULL;
 	struct vchiq_header_struct *header;
 	int type = VCHIQ_MSG_TYPE(msgid);
@@ -1062,7 +1062,7 @@ queue_message_sync(VCHIQ_STATE_T *state, struct vchiq_service_struct *service,
 					    size_t offset, size_t maxsize),
 		   void *context, int size, int is_blocking)
 {
-	VCHIQ_SHARED_STATE_T *local;
+	struct vchiq_shared_state_struct *local;
 	struct vchiq_header_struct *header;
 	ssize_t callback_result;
 
@@ -1534,7 +1534,7 @@ parse_open(VCHIQ_STATE_T *state, struct vchiq_header_struct *header)
 static void
 parse_rx_slots(VCHIQ_STATE_T *state)
 {
-	VCHIQ_SHARED_STATE_T *remote = state->remote;
+	struct vchiq_shared_state_struct *remote = state->remote;
 	struct vchiq_service_struct *service = NULL;
 	int tx_pos;
 
@@ -1886,7 +1886,7 @@ static int
 slot_handler_func(void *v)
 {
 	VCHIQ_STATE_T *state = (VCHIQ_STATE_T *) v;
-	VCHIQ_SHARED_STATE_T *local = state->local;
+	struct vchiq_shared_state_struct *local = state->local;
 
 	DEBUG_INITIALISE(local)
 
@@ -1970,7 +1970,7 @@ static int
 recycle_func(void *v)
 {
 	VCHIQ_STATE_T *state = (VCHIQ_STATE_T *) v;
-	VCHIQ_SHARED_STATE_T *local = state->local;
+	struct vchiq_shared_state_struct *local = state->local;
 	BITSET_T *found;
 	size_t length;
 
@@ -1994,10 +1994,10 @@ static int
 sync_func(void *v)
 {
 	VCHIQ_STATE_T *state = (VCHIQ_STATE_T *) v;
-	VCHIQ_SHARED_STATE_T *local = state->local;
+	struct vchiq_shared_state_struct *local = state->local;
 	struct vchiq_header_struct *header =
 		(struct vchiq_header_struct *)SLOT_DATA_FROM_INDEX(state,
-			state->remote->slot_sync);
+						state->remote->slot_sync);
 
 	while (1) {
 		struct vchiq_service_struct *service;
@@ -2156,8 +2156,8 @@ vchiq_init_slots(void *mem_base, int mem_size)
 VCHIQ_STATUS_T
 vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T *slot_zero)
 {
-	VCHIQ_SHARED_STATE_T *local;
-	VCHIQ_SHARED_STATE_T *remote;
+	struct vchiq_shared_state_struct *local;
+	struct vchiq_shared_state_struct *remote;
 	VCHIQ_STATUS_T status;
 	char threadname[16];
 	int i;
@@ -3243,7 +3243,7 @@ vchiq_release_message(VCHIQ_SERVICE_HANDLE_T handle,
 		      struct vchiq_header_struct *header)
 {
 	struct vchiq_service_struct *service = find_service_by_handle(handle);
-	VCHIQ_SHARED_STATE_T *remote;
+	struct vchiq_shared_state_struct *remote;
 	VCHIQ_STATE_T *state;
 	int slot_index;
 
@@ -3386,7 +3386,7 @@ vchiq_set_service_option(VCHIQ_SERVICE_HANDLE_T handle,
 
 static void
 vchiq_dump_shared_state(void *dump_context, VCHIQ_STATE_T *state,
-	VCHIQ_SHARED_STATE_T *shared, const char *label)
+	struct vchiq_shared_state_struct *shared, const char *label)
 {
 	static const char *const debug_names[] = {
 		"<entries>",
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 63cdb2bff224..533bb8d49d4f 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -341,7 +341,7 @@ struct vchiq_service_quota_struct {
 	int previous_tx_index;
 };
 
-typedef struct vchiq_shared_state_struct {
+struct vchiq_shared_state_struct {
 
 	/* A non-zero value here indicates that the content is valid. */
 	int initialised;
@@ -380,7 +380,7 @@ typedef struct vchiq_shared_state_struct {
 
 	/* Debugging state */
 	int debug[DEBUG_MAX];
-} VCHIQ_SHARED_STATE_T;
+};
 
 typedef struct vchiq_slot_zero_struct {
 	int magic;
@@ -391,8 +391,8 @@ typedef struct vchiq_slot_zero_struct {
 	int max_slots;
 	int max_slots_per_side;
 	int platform_data[2];
-	VCHIQ_SHARED_STATE_T master;
-	VCHIQ_SHARED_STATE_T slave;
+	struct vchiq_shared_state_struct master;
+	struct vchiq_shared_state_struct slave;
 	VCHIQ_SLOT_INFO_T slots[VCHIQ_MAX_SLOTS];
 } VCHIQ_SLOT_ZERO_T;
 
@@ -402,8 +402,8 @@ struct vchiq_state_struct {
 	VCHIQ_CONNSTATE_T conn_state;
 	short version_common;
 
-	VCHIQ_SHARED_STATE_T *local;
-	VCHIQ_SHARED_STATE_T *remote;
+	struct vchiq_shared_state_struct *local;
+	struct vchiq_shared_state_struct *remote;
 	VCHIQ_SLOT_T *slot_data;
 
 	unsigned short default_slot_quota;
-- 
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