Completely removed all trace of the typedef of PARSER_CONTEXT and replaced all instance of that typedef with parser_context_tag also changed PARSER_CONTEXT_Tag PARSER_CONTEXT_Tag => parser_context_tag
Signed-off-by: Jeffrey Brown <jeffrey.br...@unisys.com> --- drivers/staging/unisys/visorchipset/parser.c | 29 +++++++++++----------- drivers/staging/unisys/visorchipset/parser.h | 26 +++++++++---------- .../unisys/visorchipset/visorchipset_main.c | 10 +++++--- 3 files changed, 34 insertions(+), 31 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 50180f3..4a880b8 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -31,7 +31,7 @@ #define MAX_CONTROLVM_PAYLOAD_BYTES (1024*128) static ulong Controlvm_Payload_Bytes_Buffered; -struct PARSER_CONTEXT_Tag { +struct parser_context_tag { ulong allocbytes; ulong param_bytes; u8 *curr; @@ -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 is_local, BOOL *try_again) { return parser_init_guts(addr, bytes, is_local, TRUE, try_again); @@ -165,7 +165,7 @@ parser_init(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) * 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 is_local, BOOL *try_again) { return parser_init_guts(addr, bytes, is_local, FALSE, try_again); @@ -174,7 +174,7 @@ parser_init_bytestream(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) /* 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 fa12df8..de3f37b 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -31,18 +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 is_local, - BOOL *try_again); -PARSER_CONTEXT *parser_init_bytestream(u64 addr, u32 bytes, BOOL is_local, - BOOL *try_again); -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(u64 addr, u32 bytes, BOOL is_local, + BOOL *try_again); +struct parser_context_tag *parser_init_bytestream(u64 addr, u32 bytes, + BOOL is_local, + BOOL *try_again); +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 de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel