[PATCH 09/10] staging: unisys: PARSER_CONTEXT typedef

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

 



Removed typedef declaration for PARSER_CONTEXT on line 34 of
parser.h and replaced every instance of PARSER_CONTEXT with
"struct parser_context_tag" because PARSER_CONTEXT is actually
parser_context_tag

Signed-off-by: Jeffrey <Jeffrey.Brown@xxxxxxxxxx>
---
 drivers/staging/unisys/visorchipset/parser.c       | 27 +++++++++++-----------
 drivers/staging/unisys/visorchipset/parser.h       | 23 +++++++++---------
 .../unisys/visorchipset/visorchipset_main.c        | 10 ++++----
 3 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c
index 7bfaa61..c38de48 100644
--- a/drivers/staging/unisys/visorchipset/parser.c
+++ b/drivers/staging/unisys/visorchipset/parser.c
@@ -40,13 +40,13 @@ struct parser_context_tag {
 	char data[0];
 };
 
-static PARSER_CONTEXT *
+static struct parser_context_tag *
 parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
 		 BOOL hasStandardPayloadHeader, BOOL *tryAgain)
 {
-	int allocbytes = sizeof(PARSER_CONTEXT) + bytes;
-	PARSER_CONTEXT *rc = NULL;
-	PARSER_CONTEXT *ctx = NULL;
+	int allocbytes = sizeof(struct parser_context_tag) + bytes;
+	struct parser_context_tag *rc = NULL;
+	struct parser_context_tag *ctx = NULL;
 	struct memregion *rgn = NULL;
 	struct spar_controlvm_parameters_header *phdr = NULL;
 
@@ -154,7 +154,7 @@ Away:
 	return rc;
 }
 
-PARSER_CONTEXT *
+struct parser_context_tag *
 parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
 {
 	return parser_init_guts(addr, bytes, isLocal, TRUE, tryAgain);
@@ -165,7 +165,7 @@ parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
  * structures.  Afterwards, you can call parser_simpleString_get() or
  * parser_byteStream_get() to obtain the data.
  */
-PARSER_CONTEXT *
+struct parser_context_tag *
 parser_init_bytestream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
 {
 	return parser_init_guts(addr, bytes, isLocal, FALSE, tryAgain);
@@ -174,7 +174,7 @@ parser_init_bytestream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
 /* Obtain '\0'-terminated copy of string in payload area.
  */
 char *
-parser_simplestring_get(PARSER_CONTEXT *ctx)
+parser_simplestring_get(struct parser_context_tag *ctx)
 {
 	if (!ctx->byte_stream)
 		return NULL;
@@ -186,7 +186,7 @@ parser_simplestring_get(PARSER_CONTEXT *ctx)
 /* Obtain a copy of the buffer in the payload area.
  */
 void *
-parser_bytestream_get(PARSER_CONTEXT *ctx, ulong *nbytes)
+parser_bytestream_get(struct parser_context_tag *ctx, ulong *nbytes)
 {
 	if (!ctx->byte_stream)
 		return NULL;
@@ -196,7 +196,7 @@ parser_bytestream_get(PARSER_CONTEXT *ctx, ulong *nbytes)
 }
 
 uuid_le
-parser_id_get(PARSER_CONTEXT *ctx)
+parser_id_get(struct parser_context_tag *ctx)
 {
 	struct spar_controlvm_parameters_header *phdr = NULL;
 
@@ -210,7 +210,8 @@ parser_id_get(PARSER_CONTEXT *ctx)
 }
 
 void
-parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string)
+parser_param_start(struct parser_context_tag *ctx,
+		   PARSER_WHICH_STRING which_string)
 {
 	struct spar_controlvm_parameters_header *phdr = NULL;
 
@@ -247,7 +248,7 @@ Away:
 }
 
 void
-parser_done(PARSER_CONTEXT *ctx)
+parser_done(struct parser_context_tag *ctx)
 {
 	if (!ctx)
 		return;
@@ -290,7 +291,7 @@ string_length_no_trail(char *s, int len)
  *    parameter
  */
 void *
-parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
+parser_param_get(struct parser_context_tag *ctx, char *nam, int namesize)
 {
 	u8 *pscan, *pnam = nam;
 	ulong nscan;
@@ -446,7 +447,7 @@ parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize)
 }
 
 void *
-parser_string_get(PARSER_CONTEXT *ctx)
+parser_string_get(struct parser_context_tag *ctx)
 {
 	u8 *pscan;
 	ulong nscan;
diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h
index 33d9e01..e49a2e7 100644
--- a/drivers/staging/unisys/visorchipset/parser.h
+++ b/drivers/staging/unisys/visorchipset/parser.h
@@ -31,17 +31,18 @@ typedef enum {
 	PARSERSTRING_NAME,
 } PARSER_WHICH_STRING;
 
-typedef struct parser_context_tag PARSER_CONTEXT;
-
-PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, BOOL islocal, BOOL *tryagain);
-PARSER_CONTEXT *parser_init_bytestream(u64 addr, u32 bytes, BOOL islocal,
+struct parser_context_tag *parser_init(u64 addr, u32 bytes, BOOL islocal,
 				       BOOL *tryagain);
-void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string);
-void *parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize);
-void *parser_string_get(PARSER_CONTEXT *ctx);
-uuid_le parser_id_get(PARSER_CONTEXT *ctx);
-char *parser_simplestring_get(PARSER_CONTEXT *ctx);
-void *parser_bytestream_get(PARSER_CONTEXT *ctx, ulong *nbytes);
-void parser_done(PARSER_CONTEXT *ctx);
+struct parser_context_tag *parser_init_bytestream(u64 addr, u32 bytes,
+						  BOOL islocal,
+						  BOOL *tryagain);
+void parser_param_start(struct parser_context_tag *ctx,
+			PARSER_WHICH_STRING which_string);
+void *parser_param_get(struct parser_context_tag *ctx, char *nam, int namesize);
+void *parser_string_get(struct parser_context_tag *ctx);
+uuid_le parser_id_get(struct parser_context_tag *ctx);
+char *parser_simplestring_get(struct parser_context_tag *ctx);
+void *parser_bytestream_get(struct parser_context_tag *ctx, ulong *nbytes);
+void parser_done(struct parser_context_tag *ctx);
 
 #endif
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 5010c65..944c46e 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -151,7 +151,8 @@ static const char Putfile_buffer_list_pool_name[] =
  */
 struct putfile_buffer_entry {
 	struct list_head next;	/* putfile_buffer_entry list */
-	PARSER_CONTEXT *parser_ctx; /* points to buffer containing input data */
+	struct parser_context_tag *parser_ctx; /* points to buffer containing
+						input data */
 };
 
 /* List of struct putfile_request *, via next_putfile_request member.
@@ -166,7 +167,7 @@ static LIST_HEAD(Putfile_request_list);
  */
 struct putfile_active_buffer {
 	/* a payload from a controlvm message, containing a file data buffer */
-	PARSER_CONTEXT *parser_ctx;
+	struct parser_context_tag *parser_ctx;
 	/* points within data area of parser_ctx to next byte of data */
 	u8 *pnext;
 	/* # bytes left from <pnext> to the end of this data buffer */
@@ -1181,7 +1182,8 @@ Away:
 }
 
 static void
-bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx)
+bus_configure(struct controlvm_message *inmsg,
+	      struct parser_context_tag *parser_ctx)
 {
 	struct controlvm_message_packet *cmd = &inmsg->cmd;
 	ulong busNo = cmd->configure_bus.bus_no;
@@ -1790,7 +1792,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
 	struct controlvm_message_packet *cmd = &inmsg.cmd;
 	u64 parametersAddr = 0;
 	u32 parametersBytes = 0;
-	PARSER_CONTEXT *parser_ctx = NULL;
+	struct parser_context_tag *parser_ctx = NULL;
 	BOOL isLocalAddr = FALSE;
 	struct controlvm_message ackmsg;
 
-- 
1.8.4

_______________________________________________
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