[PATCH 08/10] staging: unisys: parser.c space after casts
Removed all spaces after casts in parser.c Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 02cacec..17c1649 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -88,11 +88,11 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, if (addr > virt_to_phys(high_memory - 1)) { ERRDRV("%s - bad local address (0x%-16.16Lx for %lu)", __func__, - (unsigned long long) addr, (ulong) bytes); + (unsigned long long)addr, (ulong)bytes); rc = NULL; goto cleanups; } - p = __va((ulong) (addr)); + p = __va((ulong)(addr)); memcpy(ctx->data, p, bytes); } else { rgn = visor_memregion_create(addr, bytes); @@ -114,15 +114,15 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, if (phdr->total_length != bytes) { ERRDRV("%s - bad total length %lu (should be %lu)", __func__, - (ulong) (phdr->total_length), (ulong) (bytes)); + (ulong)(phdr->total_length), (ulong)(bytes)); rc = NULL; goto cleanups; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", __func__, - (ulong) (phdr->total_length), - (ulong) (phdr->header_length)); + (ulong)(phdr->total_length), + (ulong)(phdr->header_length)); rc = NULL; goto cleanups; } @@ -130,7 +130,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, sizeof(struct spar_controlvm_parameters_header)) { ERRDRV("%s - header is too small (%lu < %lu)", __func__, - (ulong) (phdr->header_length), + (ulong)(phdr->header_length), (ulong)(sizeof( struct spar_controlvm_parameters_header))); rc = NULL; @@ -192,7 +192,7 @@ parser_bytestream_get(struct parser_context_tag *ctx, ulong *nbytes) return NULL; if (nbytes) *nbytes = ctx->param_bytes; - return (void *) ctx->data; + return (void *)ctx->data; } uuid_le @@ -407,7 +407,7 @@ parser_param_get(struct parser_context_tag *ctx, char *nam, int namesize) if (value == NULL) return NULL; memcpy(value, pscan, value_length); - ((u8 *) (value))[value_length] = '\0'; + ((u8 *)(value))[value_length] = '\0'; pscan += orig_value_length; nscan -= orig_value_length; @@ -475,6 +475,6 @@ parser_string_get(struct parser_context_tag *ctx) return NULL; if (value_length > 0) memcpy(value, pscan, value_length); - ((u8 *) (value))[value_length] = '\0'; + ((u8 *)(value))[value_length] = '\0'; return value; } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/10] staging: unisys: Controlvm_Payload_Bytes_Buffered camel case
Changed the camel case of the static ulong Controlvm_Payload_Bytes_ Buffered Controlvm_Payload_Bytes_Buffered =>controlvm_payload_bytes_buffered Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index fad3fdb..88abbeb 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -29,7 +29,7 @@ * incoming payloads. This serves as a throttling mechanism. */ #define MAX_CONTROLVM_PAYLOAD_BYTES (1024*128) -static ulong Controlvm_Payload_Bytes_Buffered; +static ulong controlvm_payload_bytes_buffered; struct parser_context_tag { ulong allocbytes; @@ -57,7 +57,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, * '\0'-terminated */ allocbytes++; - if ((Controlvm_Payload_Bytes_Buffered + bytes) + if ((controlvm_payload_bytes_buffered + bytes) > MAX_CONTROLVM_PAYLOAD_BYTES) { ERRDRV("%s (%s:%d) - prevented allocation of %d bytes to prevent exceeding throttling max (%d)", __func__, __FILE__, __LINE__, allocbytes, @@ -144,7 +144,7 @@ Away: rgn = NULL; } if (rc) - Controlvm_Payload_Bytes_Buffered += ctx->param_bytes; + controlvm_payload_bytes_buffered += ctx->param_bytes; else { if (ctx) { parser_done(ctx); @@ -252,7 +252,7 @@ parser_done(struct parser_context_tag *ctx) { if (!ctx) return; - Controlvm_Payload_Bytes_Buffered -= ctx->param_bytes; + controlvm_payload_bytes_buffered -= ctx->param_bytes; kfree(ctx); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/10] staging: unisys: PARSER_CONTEXT typedef
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 --- 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
[PATCH 00/10] parser.h and parser.c patches
Sorry for all of the messy patches from before but here are the improved patches for parser.h and parser.c. The camel cases are grouped on functions and structs that occurs in both files. Jeffrey Brown (10): staging: unisys: parser_init camel cases staging: unisys: parser_init_byteStream camel case staging: unisys: simpleString_get & byteStream_get camel case staging: unisys: PARSER_CONTEXT typedef staging: unisys: PARSER_WHICH_STRING typedef staging: unisys: Controlvm_Payload_Bytes_Buffered camel case staging: unisys: parser_init_guts and parser_param_start camel case staging: unisys: parser.c space after casts staging: unisys: parser.c braces staging: unisys: parser.c logical continuation drivers/staging/unisys/visorchipset/parser.c | 117 +++-- drivers/staging/unisys/visorchipset/parser.h | 29 ++--- .../unisys/visorchipset/visorchipset_main.c| 12 ++- 3 files changed, 81 insertions(+), 77 deletions(-) -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/10] staging: unisys: parser_init camel cases
Fixed camel cases for parser_init isLocal => is_local tryAgain => try_again Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 4 ++-- drivers/staging/unisys/visorchipset/parser.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 9edbd3b..38264c6 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -155,9 +155,9 @@ Away: } PARSER_CONTEXT * -parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain) +parser_init(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) { - return parser_init_guts(addr, bytes, isLocal, TRUE, tryAgain); + return parser_init_guts(addr, bytes, is_local, TRUE, try_again); } /* Call this instead of parser_init() if the payload area consists of just diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index 9fbe3b5..4f26413 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -33,7 +33,8 @@ typedef enum { typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT; -PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain); +PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, BOOL is_local, + BOOL *try_again); PARSER_CONTEXT *parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain); void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/10] staging: unisys: parser_init_byteStream camel case
Changed the camel cases for the struct parser_init_bytestream parser_init_byteStream => parser_init_bytestream isLocal => is_local tryAgain => try_again Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c| 4 ++-- drivers/staging/unisys/visorchipset/parser.h| 4 ++-- drivers/staging/unisys/visorchipset/visorchipset_main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 38264c6..8cd3b4f 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -166,9 +166,9 @@ parser_init(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) * parser_byteStream_get() to obtain the data. */ PARSER_CONTEXT * -parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain) +parser_init_bytestream(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) { - return parser_init_guts(addr, bytes, isLocal, FALSE, tryAgain); + return parser_init_guts(addr, bytes, is_local, FALSE, try_again); } /* Obtain '\0'-terminated copy of string in payload area. diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index 4f26413..10b922e 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -35,8 +35,8 @@ 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 isLocal, - BOOL *tryAgain); +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); diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index c8f7bea..5010c65 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1811,7 +1811,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) BOOL retry = FALSE; parser_ctx = - parser_init_byteStream(parametersAddr, parametersBytes, + parser_init_bytestream(parametersAddr, parametersBytes, isLocalAddr, &retry); if (!parser_ctx) { if (retry) { -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/10] staging: unisys: parser_init_guts and parser_param_start camel case
Fixed camel cases in the struct parser_init_guts and an Away camel case in parser_param_start isLocal => is_local tryAgain => try_again HasStandardPayloadHeader => has_standard_payload_header Away => cleanups Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 46 ++-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 88abbeb..02cacec 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -41,8 +41,8 @@ struct parser_context_tag { }; static struct parser_context_tag * -parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, -BOOL hasStandardPayloadHeader, BOOL *tryAgain) +parser_init_guts(u64 addr, u32 bytes, BOOL is_local, +BOOL has_standard_payload_header, BOOL *try_again) { int allocbytes = sizeof(struct parser_context_tag) + bytes; struct parser_context_tag *rc = NULL; @@ -50,9 +50,9 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, struct memregion *rgn = NULL; struct spar_controlvm_parameters_header *phdr = NULL; - if (tryAgain) - *tryAgain = FALSE; - if (!hasStandardPayloadHeader) + if (try_again) + *try_again = FALSE; + if (!has_standard_payload_header) /* alloc and 0 extra byte to ensure payload is * '\0'-terminated */ @@ -62,19 +62,19 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, ERRDRV("%s (%s:%d) - prevented allocation of %d bytes to prevent exceeding throttling max (%d)", __func__, __FILE__, __LINE__, allocbytes, MAX_CONTROLVM_PAYLOAD_BYTES); - if (tryAgain) - *tryAgain = TRUE; + if (try_again) + *try_again = TRUE; rc = NULL; - goto Away; + goto cleanups; } ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); if (ctx == NULL) { ERRDRV("%s (%s:%d) - failed to allocate %d bytes", __func__, __FILE__, __LINE__, allocbytes); - if (tryAgain) - *tryAgain = TRUE; + if (try_again) + *try_again = TRUE; rc = NULL; - goto Away; + goto cleanups; } ctx->allocbytes = allocbytes; @@ -82,7 +82,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, ctx->curr = NULL; ctx->bytes_remaining = 0; ctx->byte_stream = FALSE; - if (isLocal) { + if (is_local) { void *p; if (addr > virt_to_phys(high_memory - 1)) { @@ -90,7 +90,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, __func__, (unsigned long long) addr, (ulong) bytes); rc = NULL; - goto Away; + goto cleanups; } p = __va((ulong) (addr)); memcpy(ctx->data, p, bytes); @@ -98,17 +98,17 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, rgn = visor_memregion_create(addr, bytes); if (!rgn) { rc = NULL; - goto Away; + goto cleanups; } if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) { rc = NULL; - goto Away; + goto cleanups; } } - if (!hasStandardPayloadHeader) { + if (!has_standard_payload_header) { ctx->byte_stream = TRUE; rc = ctx; - goto Away; + goto cleanups; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); if (phdr->total_length != bytes) { @@ -116,7 +116,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, __func__, (ulong) (phdr->total_length), (ulong) (bytes)); rc = NULL; - goto Away; + goto cleanups; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", @@ -124,7 +124,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, (ulong) (phdr->total_length), (ulong) (phdr->header_length)); rc = NULL; - goto Away; + goto cleanups; } if (phdr->header_length < sizeof(struct spar_controlvm_parameters
[PATCH 05/10] staging: unisys: PARSER_WHICH_STRING typedef
Removed the typedef of PARSER_WHICH_STRING and replaced all instance of the typedef with enum parser_which_string. Also changed the name of it to parser_which_string PARSER_WHICH_STRING => parser_which_string Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 2 +- drivers/staging/unisys/visorchipset/parser.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 4a880b8..fad3fdb 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -211,7 +211,7 @@ parser_id_get(struct parser_context_tag *ctx) void parser_param_start(struct parser_context_tag *ctx, - PARSER_WHICH_STRING which_string) + enum parser_which_string which_string) { struct spar_controlvm_parameters_header *phdr = NULL; diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index de3f37b..5b802fc 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -24,12 +24,12 @@ #include "timskmod.h" #include "channel.h" -typedef enum { +enum parser_which_string { PARSERSTRING_INITIATOR, PARSERSTRING_TARGET, PARSERSTRING_CONNECTION, PARSERSTRING_NAME, -} PARSER_WHICH_STRING; +}; struct parser_context_tag *parser_init(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again); @@ -37,7 +37,7 @@ 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); + enum 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); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/10] staging: unisys: parser.c braces
Inserted a necessary brace for an if statement on line 146 of parser.c Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 17c1649..6381e59 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -143,9 +143,9 @@ cleanups: visor_memregion_destroy(rgn); rgn = NULL; } - if (rc) + if (rc) { controlvm_payload_bytes_buffered += ctx->param_bytes; - else { + } else { if (ctx) { parser_done(ctx); ctx = NULL; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/10] staging: unisys: simpleString_get & byteStream_get camel case
Fixed the camel case for parser_byteStream_get and parser_simpleString_get parser_simpleString_get => parser_simplestring_get parser_byteStream_get => parser_bytestream_get Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 4 ++-- drivers/staging/unisys/visorchipset/parser.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 8cd3b4f..50180f3 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -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(PARSER_CONTEXT *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(PARSER_CONTEXT *ctx, ulong *nbytes) { if (!ctx->byte_stream) return NULL; diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index 10b922e..fa12df8 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -36,13 +36,13 @@ 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); + 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); +char *parser_simplestring_get(PARSER_CONTEXT *ctx); +void *parser_bytestream_get(PARSER_CONTEXT *ctx, ulong *nbytes); void parser_done(PARSER_CONTEXT *ctx); #endif -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/10] staging: unisys: parser.c logical continuation
Fixed a logical continuation on line 391 by placing the '||' operator on line 390 Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 6381e59..5f6a7b2 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -387,8 +387,8 @@ parser_param_get(struct parser_context_tag *ctx, char *nam, int namesize) break; } } else - if (pscan[i] == ',' || pscan[i] == ';' - || pscan[i] == '\0') { + if (pscan[i] == ',' || pscan[i] == ';' || + pscan[i] == '\0') { value_length = i; break; } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/71] staging: unisys: kzalloc visorchipset_main.c
From: Jeffrey Inserted preferred sizeof statements for kzalloc in visorchipset_ main.c line 1127: kzalloc(sizeof(*pBusInfo)...) line 1277: kzalloc(sizeof(*pDevInfo)...) Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index eaa7a8a..14ecb0e 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1124,7 +1124,7 @@ bus_create(struct controlvm_message *inmsg) rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; goto Away; } - pBusInfo = kzalloc(sizeof(struct visorchipset_bus_info), GFP_KERNEL); + pBusInfo = kzalloc(sizeof(*pBusInfo), GFP_KERNEL); if (pBusInfo == NULL) { LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu kzalloc failed", busNo); @@ -1274,7 +1274,7 @@ my_device_create(struct controlvm_message *inmsg) rc = -CONTROLVM_RESP_ERROR_BUS_INVALID; goto Away; } - pDevInfo = kzalloc(sizeof(struct visorchipset_device_info), GFP_KERNEL); + pDevInfo = kzalloc(sizeof(*pDevInfo), GFP_KERNEL); if (pDevInfo == NULL) { LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu kmaloc failed", busNo, devNo); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/71] visorchipset_main.c patches
I am really sorry about the exterme number of patches I gave you, it was a very large file to take care of I could make the number of patches a little less if you want. The patches start off simple by taking care of trivial stuff like alignment and space after casts. The patches go into the camel cases. The camel cases are grouped based on the name of the function or structs they are in. If they don't belong to one then they get a patch on their own. Last but not least the typedefs are done and the array checks are fixed Jeffrey (71): staging: unisys: space after a cast visorchipset_main.c staging: unisys: Alignment fixes visorchipset_main.c staging: unisys: visorchipset_main.c logical continuations staging: unisys: kzalloc visorchipset_main.c staging: unisys: visorchipset_main.c braces and spaces staging: unisys: Poll_jiffies camel case staging: unisys: Most_recent_message_jiffies staging: unisys: Periodic_controlvm_work camel case stating: unisys: Periodic_controlvm_workqueue camel case staging: unisys: NotifierLock camel case staging: unisys: controlvm_message_header camel case staging: unisys: static const uuid_le camel case staging: unisys: invalid bus/device number camel cases staging: unisys: controlvm_message_packet camel case staging: unisys: LIST_HEAD info list camel cases staging: unisys: Controlvm_channel camel case staging: unisys: Test_Vnic_channel camel case staging: unisys: LIVEDUMP_INFO camel cases staging: unisys: Controlvm_payload_info camel case staging: unisys: Livedump_info camel case staging: unisys: Controlvm_pending_msg camel case staging: unisys: Putfile_buffer_list_pool_name camel case staging: unisys: Putfile_buffer_list_pool camel case staging: unisys: Putfile_request_list camel case staging: unisys: atomic_t camel case staging: unisys: Parahotplug_request_list camel case staging: unisys: visorchipset_busdev_notifiers camel cases staging: unisys: bus_create_response camel cases staging: unisys: bus_destroy_response camel cases staging: unisys: device_create_response camel cases staging: unisys: device_destroy_response camel cases staging: unisys: device_resume_response camel cases staging: unisys: BusDev_Responders camel case staging: unisys: Controlvm_Pending_Msg_Valid camel case staging: unisys: Parahotplug_request_list_lock camel case staging: unisys: MajorDev camel case staging: unisys: platform_device camel case staging: unisys: controlvm prototype camel cases staging: unisys: toolAction camel cases staging: unisys: efisparindication camel cases staging: unisys: textId camel cases staging: unisys: remainingSteps camel cases staging: unisys: busInfo_clear camel cases staging: unisys: devInfo_clear camel case staging: unisys: chipset_init camel cases staging: unisys: controlvm camel cases staging: unisys: visorchipset_save_message camel cases staging: unisys: bus_responder camel case staging: unisys: device_changestate_responder camel cases staging: unisys: device_responder camel cases staging: unisys: bus_epilog camel cases staging: unisys: device_epilog camel case staging: unisys: bus_create camel cases staging: unisys: bus_destroy camel cases staging: unisys: bus_configure camel case staging: unisys: my_device_create camel cases staging: unisys: my_device_changestate camel case staging: unisys: my_device_destroy camel cases staging: unisys: initialize_controlvm_payload_info camel case staging: unisys: initialize_controlvm_payload camel case staging: unisys: chipset camel cases staging: unisys: handle_command camel cases staging: unisys: controlvm_periodic_work camel cases staging: unisys: setup_crash_devices_work_queue camel cases staging: unisys: visorchipset_init camel cases staging: unisys: testUnicode camel case staging: unisys: Unnecessary parentheses staging: unisys: MESSAGE_ENVELOPE typedef staging: unisys: CONTROLVM_PAYLOAD_INFO typedef staging: unisys: LIVEDUMP_INFO typedef staging: unisys: static const chars visorchipset_main.c .../unisys/visorchipset/visorchipset_main.c| 1270 ++-- 1 file changed, 639 insertions(+), 631 deletions(-) -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/71] staging: unisys: visorchipset_main.c braces and spaces
From: Jeffrey Inserted and formatted braces properly, also removed unnecessary spaces that were usually surrounding the braces Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 24 +- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 14ecb0e..fef28c0 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -485,7 +485,6 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr, return count; } - static ssize_t remaining_steps_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -956,9 +955,9 @@ bus_epilog(u32 busNo, if (needResponse) { memcpy(&pBusInfo->pending_msg_hdr, msgHdr, sizeof(struct controlvm_message_header)); - } else + } else { pBusInfo->pending_msg_hdr.id = CONTROLVM_INVALID; - + } down(&NotifierLock); if (response == CONTROLVM_RESP_SUCCESS) { switch (cmd) { @@ -1033,9 +1032,9 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, if (needResponse) { memcpy(&pDevInfo->pending_msg_hdr, msgHdr, sizeof(struct controlvm_message_header)); - } else + } else { pDevInfo->pending_msg_hdr.id = CONTROLVM_INVALID; - + } down(&NotifierLock); if (response >= 0) { switch (cmd) { @@ -1114,7 +1113,6 @@ bus_create(struct controlvm_message *inmsg) int rc = CONTROLVM_RESP_SUCCESS; struct visorchipset_bus_info *pBusInfo = NULL; - pBusInfo = findbus(&BusInfoList, busNo); if (pBusInfo && (pBusInfo->state.created == 1)) { LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu already exists", @@ -2004,8 +2002,9 @@ controlvm_periodic_work(struct work_struct *work) inmsg = ControlVm_Pending_Msg; ControlVm_Pending_Msg_Valid = FALSE; gotACommand = TRUE; - } else + } else { gotACommand = read_controlvm_event(&inmsg); + } } handle_command_failed = FALSE; @@ -2057,7 +2056,6 @@ Away: static void setup_crash_devices_work_queue(struct work_struct *work) { - struct controlvm_message localCrashCreateBusMsg; struct controlvm_message localCrashCreateDevMsg; struct controlvm_message msg; @@ -2138,9 +2136,9 @@ setup_crash_devices_work_queue(struct work_struct *work) } /* reuse IOVM create bus message */ - if (localCrashCreateBusMsg.cmd.create_bus.channel_addr != 0) + if (localCrashCreateBusMsg.cmd.create_bus.channel_addr != 0) { bus_create(&localCrashCreateBusMsg); - else { + } else { LOGERR("CrashCreateBusMsg is null, no dump will be taken"); POSTCODE_LINUX_2(CRASH_DEV_BUS_NULL_FAILURE_PC, POSTCODE_SEVERITY_ERR); @@ -2148,9 +2146,9 @@ setup_crash_devices_work_queue(struct work_struct *work) } /* reuse create device message for storage device */ - if (localCrashCreateDevMsg.cmd.create_device.channel_addr != 0) + if (localCrashCreateDevMsg.cmd.create_device.channel_addr != 0) { my_device_create(&localCrashCreateDevMsg); - else { + } else { LOGERR("CrashCreateDevMsg is null, no dump will be taken"); POSTCODE_LINUX_2(CRASH_DEV_DEV_NULL_FAILURE_PC, POSTCODE_SEVERITY_ERR); @@ -2195,7 +2193,6 @@ device_destroy_response(ulong busNo, ulong devNo, int response) void visorchipset_device_pause_response(ulong bus_no, ulong dev_no, int response) { - device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE, bus_no, dev_no, response, segment_state_standby); @@ -2479,7 +2476,6 @@ visorchipset_init(void) DIAG_SEVERITY_ERR); goto Away; } - } Visorchipset_platform_device.dev.devt = MajorDev; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/71] staging: unisys: space after a cast visorchipset_main.c
From: Jeffrey Removed all spaces after casts in visorchipset_main.c Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 62 +++--- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index c8f7bea..003b6f3 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -542,7 +542,7 @@ testUnicode(void) static void busInfo_clear(void *v) { - struct visorchipset_bus_info *p = (struct visorchipset_bus_info *) (v); + struct visorchipset_bus_info *p = (struct visorchipset_bus_info *)(v); if (p->proc_object) { visor_proc_DestroyObject(p->proc_object); @@ -700,7 +700,7 @@ controlvm_init_response(struct controlvm_message *msg, msg->hdr.payload_max_bytes = 0; if (response < 0) { msg->hdr.flags.failed = 1; - msg->hdr.completion_status = (u32) (-response); + msg->hdr.completion_status = (u32)(-response); } } @@ -851,7 +851,7 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response) LOGERR("bus_responder no pending msg"); return; /* no controlvm response needed */ } - if (p->pending_msg_hdr.id != (u32) cmdId) { + if (p->pending_msg_hdr.id != (u32)cmdId) { LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id); return; } @@ -923,7 +923,7 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, LOGERR("device_responder no pending msg"); return; /* no controlvm response needed */ } - if (p->pending_msg_hdr.id != (u32) cmdId) { + if (p->pending_msg_hdr.id != (u32)cmdId) { LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id); return; } @@ -1399,14 +1399,14 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes, memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO)); if ((offset == 0) || (bytes == 0)) { LOGERR("CONTROLVM_PAYLOAD_INIT Failed: request_payload_offset=%llu request_payload_bytes=%llu!", -(u64) offset, (u64) bytes); +(u64)offset, (u64)bytes); rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID; goto Away; } payload = ioremap_cache(phys_addr + offset, bytes); if (payload == NULL) { LOGERR("CONTROLVM_PAYLOAD_INIT Failed: ioremap_cache %llu for %llu bytes failed", -(u64) offset, (u64) bytes); +(u64)offset, (u64)bytes); rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED; goto Away; } @@ -1415,7 +1415,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes, info->bytes = bytes; info->ptr = payload; LOGINF("offset=%llu, bytes=%lu, ptr=%p", - (u64) (info->offset), (ulong) (info->bytes), info->ptr); + (u64)(info->offset), (ulong)(info->bytes), info->ptr); Away: if (rc < 0) { @@ -1819,9 +1819,9 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) return FALSE; } LOGWRN("parsing failed"); - LOGWRN("inmsg.hdr.Id=0x%lx", (ulong) inmsg.hdr.id); - LOGWRN("parametersAddr=0x%llx", (u64) parametersAddr); - LOGWRN("parametersBytes=%lu", (ulong) parametersBytes); + LOGWRN("inmsg.hdr.Id=0x%lx", (ulong)inmsg.hdr.id); + LOGWRN("parametersAddr=0x%llx", (u64)parametersAddr); + LOGWRN("parametersBytes=%lu", (ulong)parametersBytes); LOGWRN("isLocalAddr=%d", isLocalAddr); } } @@ -1838,42 +1838,42 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) switch (inmsg.hdr.id) { case CONTROLVM_CHIPSET_INIT: LOGINF("CHIPSET_INIT(#busses=%lu,#switches=%lu)", - (ulong) inmsg.cmd.init_chipset.bus_count, - (ulong) inmsg.cmd.init_chipset.switch_count); + (ulong)inmsg.cmd.init_chipset.bus_count, + (ulong)inmsg.cmd.init_chipset.switch_count); chipset_init(&inmsg); break; case CONTROLVM_BUS_CREATE: LOGINF("BUS_CREATE(%lu,#
[PATCH 41/71] staging: unisys: textId camel cases
From: Jeffrey Changed the u32 textId to textid in the static ssize_ts textid_show and textid_store textId => textid Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 80a81cc..b7da582 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -459,27 +459,27 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr, static ssize_t textid_show(struct device *dev, struct device_attribute *attr, char *buf) { - u32 textId; + u32 textid; visorchannel_read(controlvm_channel, offsetof( struct spar_controlvm_channel_protocol, installation_text_id), - &textId, sizeof(u32)); - return scnprintf(buf, PAGE_SIZE, "%i\n", textId); + &textid, sizeof(u32)); + return scnprintf(buf, PAGE_SIZE, "%i\n", textid); } static ssize_t textid_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - u32 textId; + u32 textid; int ret; - if (kstrtou32(buf, 10, &textId) != 0) + if (kstrtou32(buf, 10, &textid) != 0) return -EINVAL; ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, installation_text_id), - &textId, sizeof(u32)); + &textid, sizeof(u32)); if (ret) return ret; return count; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/71] staging: unisys: NotifierLock camel case
From: Jeffrey Replaced the static DEFINE_SEMAPHORE NotifierLock with notifierlock NotifierLock => notifierlock Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 58ffe19..8099c21 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -69,7 +69,7 @@ static u8 chipset_events[MAX_CHIPSET_EVENTS] = { 0, 0 }; static struct delayed_work periodic_controlvm_work; static struct workqueue_struct *periodic_controlvm_workqueue; -static DEFINE_SEMAPHORE(NotifierLock); +static DEFINE_SEMAPHORE(notifierlock); typedef struct { struct controlvm_message message; @@ -600,7 +600,7 @@ visorchipset_register_busdev_server( struct visorchipset_busdev_responders *responders, struct ultra_vbus_deviceinfo *driver_info) { - down(&NotifierLock); + down(¬ifierlock); if (notifiers == NULL) { memset(&BusDev_Server_Notifiers, 0, sizeof(BusDev_Server_Notifiers)); @@ -615,7 +615,7 @@ visorchipset_register_busdev_server( bus_device_info_init(driver_info, "chipset", "visorchipset", VERSION, NULL); - up(&NotifierLock); + up(¬ifierlock); } EXPORT_SYMBOL_GPL(visorchipset_register_busdev_server); @@ -625,7 +625,7 @@ visorchipset_register_busdev_client( struct visorchipset_busdev_responders *responders, struct ultra_vbus_deviceinfo *driver_info) { - down(&NotifierLock); + down(¬ifierlock); if (notifiers == NULL) { memset(&BusDev_Client_Notifiers, 0, sizeof(BusDev_Client_Notifiers)); @@ -639,7 +639,7 @@ visorchipset_register_busdev_client( if (driver_info) bus_device_info_init(driver_info, "chipset(bolts)", "visorchipset", VERSION, NULL); - up(&NotifierLock); + up(¬ifierlock); } EXPORT_SYMBOL_GPL(visorchipset_register_busdev_client); @@ -958,7 +958,7 @@ bus_epilog(u32 busNo, } else { pBusInfo->pending_msg_hdr.id = CONTROLVM_INVALID; } - down(&NotifierLock); + down(¬ifierlock); if (response == CONTROLVM_RESP_SUCCESS) { switch (cmd) { case CONTROLVM_BUS_CREATE: @@ -1003,7 +1003,7 @@ bus_epilog(u32 busNo, ; else bus_responder(cmd, busNo, response); - up(&NotifierLock); + up(¬ifierlock); } static void @@ -1035,7 +1035,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, } else { pDevInfo->pending_msg_hdr.id = CONTROLVM_INVALID; } - down(&NotifierLock); + down(¬ifierlock); if (response >= 0) { switch (cmd) { case CONTROLVM_DEVICE_CREATE: @@ -1102,7 +1102,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, ; else device_responder(cmd, busNo, devNo, response); - up(&NotifierLock); + up(¬ifierlock); } static void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/71] staging: unisys: invalid bus/device number camel cases
From: Jeffrey Changed two static ulongs that are supposed to represent invalid bus/device numbers g_diagpoolBusNo => g_diagpoolbusno g_diagpoolDevNo => g_diagpooldevno Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 566fef7..4a1b69b 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -82,8 +82,8 @@ static struct controlvm_message_header g_deldumpmsghdr; static const uuid_le ultradiagpoolchannelprotocolguid = SPAR_DIAG_POOL_CHANNEL_PROTOCOL_UUID; /* 0xff is an invalid Bus/Device number */ -static ulong g_diagpoolBusNo = 0xff; -static ulong g_diagpoolDevNo = 0xff; +static ulong g_diagpoolbusno = 0xff; +static ulong g_diagpooldevno = 0xff; static struct controlvm_message_packet g_DeviceChangeStatePacket; /* Only VNIC and VHBA channels are sent to visorclientbus (aka @@ -720,9 +720,9 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response) * back the deviceChangeState structure in the packet. */ if (msgHdr->id == CONTROLVM_DEVICE_CHANGESTATE && g_DeviceChangeStatePacket.device_change_state.bus_no == - g_diagpoolBusNo && + g_diagpoolbusno && g_DeviceChangeStatePacket.device_change_state.dev_no == - g_diagpoolDevNo) + g_diagpooldevno) outmsg.cmd = g_DeviceChangeStatePacket; if (outmsg.hdr.flags.test_message == 1) { LOGINF("%s controlvm_msg=0x%x response=%d for test message", @@ -1073,8 +1073,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, /* this is lite pause where channel is * still valid just 'pause' of it */ - if (busNo == g_diagpoolBusNo && - devNo == g_diagpoolDevNo) { + if (busNo == g_diagpoolbusno && + devNo == g_diagpooldevno) { LOGINF("DEVICE_CHANGESTATE(DiagpoolChannel busNo=%d devNo=%d is pausing...)", busNo, devNo); /* this will trigger the @@ -1305,10 +1305,10 @@ Away: /* get the bus and devNo for DiagPool channel */ if (pDevInfo && is_diagpool_channel(pDevInfo->chan_info.channel_type_uuid)) { - g_diagpoolBusNo = busNo; - g_diagpoolDevNo = devNo; + g_diagpoolbusno = busNo; + g_diagpooldevno = devNo; LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu", - g_diagpoolBusNo, g_diagpoolDevNo); + g_diagpoolbusno, g_diagpooldevno); } device_epilog(busNo, devNo, segment_state_running, CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc, -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 34/71] staging: unisys: Controlvm_Pending_Msg_Valid camel case
From: Jeffrey Changed the static BOOL to controlvm_pending_msg_valid Controlvm_Pending_Msg_Valid => controlvm_pending_msg_valid Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 5096a85..887e3be 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -137,7 +137,7 @@ static LIVEDUMP_INFO livedump_info; * process it again the next time controlvm_periodic_work() runs. */ static struct controlvm_message controlvm_pending_msg; -static BOOL ControlVm_Pending_Msg_Valid = FALSE; +static BOOL controlvm_pending_msg_valid = FALSE; /* Pool of struct putfile_buffer_entry, for keeping track of pending (incoming) * TRANSMIT_FILE PutFile payloads. @@ -1994,13 +1994,13 @@ controlvm_periodic_work(struct work_struct *work) } } if (!gotACommand) { - if (ControlVm_Pending_Msg_Valid) { + if (controlvm_pending_msg_valid) { /* we throttled processing of a prior * msg, so try to process it again * rather than reading a new one */ inmsg = controlvm_pending_msg; - ControlVm_Pending_Msg_Valid = FALSE; + controlvm_pending_msg_valid = FALSE; gotACommand = TRUE; } else { gotACommand = read_controlvm_event(&inmsg); @@ -2023,7 +2023,7 @@ controlvm_periodic_work(struct work_struct *work) */ handle_command_failed = TRUE; controlvm_pending_msg = inmsg; - ControlVm_Pending_Msg_Valid = TRUE; + controlvm_pending_msg_valid = TRUE; } } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 39/71] staging: unisys: toolAction camel cases
From: Jeffrey Changed the camel cases of toolAction to toolaction in the static ssize_ts toolaction_store, and toolaction_show toolAction => toolaction Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 83382ec..d21752f 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -364,28 +364,28 @@ static ssize_t toolaction_show(struct device *dev, struct device_attribute *attr, char *buf) { - u8 toolAction; + u8 toolaction; visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, - tool_action), &toolAction, sizeof(u8)); - return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction); + tool_action), &toolaction, sizeof(u8)); + return scnprintf(buf, PAGE_SIZE, "%u\n", toolaction); } static ssize_t toolaction_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - u8 toolAction; + u8 toolaction; int ret; - if (kstrtou8(buf, 10, &toolAction) != 0) + if (kstrtou8(buf, 10, &toolaction) != 0) return -EINVAL; ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, tool_action), - &toolAction, sizeof(u8)); + &toolaction, sizeof(u8)); if (ret) return ret; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 36/71] staging: unisys: MajorDev camel case
From: Jeffrey Changed the static dev_t at line 252 to majordev Major => majordev Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 1a04e5b..6263dea 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -249,7 +249,7 @@ static struct visorchipset_busdev_responders busdev_responders = { }; /* info for /dev/visorchipset */ -static dev_t MajorDev = -1; /**< indicates major num for device */ +static dev_t majordev = -1; /**< indicates major num for device */ /* prototypes for attributes */ static ssize_t toolaction_show(struct device *dev, @@ -2421,8 +2421,8 @@ visorchipset_init(void) return -ENODEV; } - MajorDev = MKDEV(visorchipset_major, 0); - rc = visorchipset_file_init(MajorDev, &controlvm_channel); + majordev = MKDEV(visorchipset_major, 0); + rc = visorchipset_file_init(majordev, &controlvm_channel); if (rc < 0) { ERRDRV("visorchipset_file_init(MajorDev, &ControlVm_channel): error (status=%d)\n", rc); POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR); @@ -2478,7 +2478,7 @@ visorchipset_init(void) } } - Visorchipset_platform_device.dev.devt = MajorDev; + Visorchipset_platform_device.dev.devt = majordev; if (platform_device_register(&Visorchipset_platform_device) < 0) { ERRDRV("platform_device_register(visorchipset) failed: (status=-1)\n"); POSTCODE_LINUX_2(DEVICE_REGISTER_FAILURE_PC, DIAG_SEVERITY_ERR); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/71] staging: unisys: visorchipset_main.c logical continuations
From: Jeffrey Fixed all logical continuations by moving the operators to their correct lines, (which is the line previous to the operator) Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 23 +++--- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 73cd0a3..eaa7a8a 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -91,8 +91,8 @@ static struct controlvm_message_packet g_DeviceChangeStatePacket; */ #define FOR_VISORHACKBUS(channel_type_guid) \ (((uuid_le_cmp(channel_type_guid,\ - spar_vnic_channel_protocol_uuid) == 0)\ - || (uuid_le_cmp(channel_type_guid,\ + spar_vnic_channel_protocol_uuid) == 0) ||\ + (uuid_le_cmp(channel_type_guid,\ spar_vhba_channel_protocol_uuid) == 0))) #define FOR_VISORBUS(channel_type_guid) (!(FOR_VISORHACKBUS(channel_type_guid))) @@ -719,10 +719,10 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response) controlvm_init_response(&outmsg, msgHdr, response); /* For DiagPool channel DEVICE_CHANGESTATE, we need to send * back the deviceChangeState structure in the packet. */ - if (msgHdr->id == CONTROLVM_DEVICE_CHANGESTATE - && g_DeviceChangeStatePacket.device_change_state.bus_no == - g_diagpoolBusNo - && g_DeviceChangeStatePacket.device_change_state.dev_no == + if (msgHdr->id == CONTROLVM_DEVICE_CHANGESTATE && + g_DeviceChangeStatePacket.device_change_state.bus_no == + g_diagpoolBusNo && + g_DeviceChangeStatePacket.device_change_state.dev_no == g_diagpoolDevNo) outmsg.cmd = g_DeviceChangeStatePacket; if (outmsg.hdr.flags.test_message == 1) { @@ -1074,8 +1074,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, /* this is lite pause where channel is * still valid just 'pause' of it */ - if (busNo == g_diagpoolBusNo - && devNo == g_diagpoolDevNo) { + if (busNo == g_diagpoolBusNo && + devNo == g_diagpoolDevNo) { LOGINF("DEVICE_CHANGESTATE(DiagpoolChannel busNo=%d devNo=%d is pausing...)", busNo, devNo); /* this will trigger the @@ -1838,8 +1838,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) if (!isLocalAddr) { controlvm_init_response(&ackmsg, &inmsg.hdr, CONTROLVM_RESP_SUCCESS); - if ((ControlVm_channel) - && + if ((ControlVm_channel) && (!visorchannel_signalinsert (ControlVm_channel, CONTROLVM_QUEUE_ACK, &ackmsg))) LOGWRN("failed to send ACK failed"); @@ -1975,8 +1974,8 @@ controlvm_periodic_work(struct work_struct *work) /* Check events to determine if response to CHIPSET_READY * should be sent */ - if (visorchipset_holdchipsetready - && (g_ChipSetMsgHdr.id != CONTROLVM_INVALID)) { + if (visorchipset_holdchipsetready && + (g_ChipSetMsgHdr.id != CONTROLVM_INVALID)) { if (check_chipset_events() == 1) { LOGINF("Sending CHIPSET_READY response"); controlvm_respond(&g_ChipSetMsgHdr, 0); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/71] staging: unisys: LIVEDUMP_INFO camel cases
From: Jeffrey Changed the camel cases for the variables for the struct LIVEDUMP_ INFO Dumpcapture_header => dumpcapture_header Gettextdump_header => gettextdump_header Dumpcomplete_header => dumpcomplete_header Gettextdump_outstanding => gettextdump_outstanding Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 992b2c3..67d959e 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -117,10 +117,10 @@ static CONTROLVM_PAYLOAD_INFO ControlVm_payload_info; static struct channel_header *test_vnic_channel; typedef struct { - struct controlvm_message_header Dumpcapture_header; - struct controlvm_message_header Gettextdump_header; - struct controlvm_message_header Dumpcomplete_header; - BOOL Gettextdump_outstanding; + struct controlvm_message_header dumpcapture_header; + struct controlvm_message_header gettextdump_header; + struct controlvm_message_header dumpcomplete_header; + BOOL gettextdump_outstanding; u32 crc32; ulong length; atomic_t buffers_in_use; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/71] staging: unisys: Alignment fixes visorchipset_main.c
From: Jeffrey Fixed all alignment issues in visorchipset_main.c, kept the 80 character warnings in mind when doing so, and if there are any warnings coming from this patch it is most likely that there was an 80 character warning at the line before I fixed the alignment Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 166 +++-- 1 file changed, 89 insertions(+), 77 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 003b6f3..73cd0a3 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -253,45 +253,52 @@ static dev_t MajorDev = -1; /**< indicates major num for device */ /* prototypes for attributes */ static ssize_t toolaction_show(struct device *dev, - struct device_attribute *attr, char *buf); + struct device_attribute *attr, + char *buf); static ssize_t toolaction_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count); + struct device_attribute *attr, + const char *buf, size_t count); static DEVICE_ATTR_RW(toolaction); static ssize_t boottotool_show(struct device *dev, - struct device_attribute *attr, char *buf); + struct device_attribute *attr, char *buf); static ssize_t boottotool_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count); + struct device_attribute *attr, + const char *buf, size_t count); static DEVICE_ATTR_RW(boottotool); static ssize_t error_show(struct device *dev, struct device_attribute *attr, - char *buf); + char *buf); static ssize_t error_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count); + const char *buf, size_t count); static DEVICE_ATTR_RW(error); static ssize_t textid_show(struct device *dev, struct device_attribute *attr, - char *buf); + char *buf); static ssize_t textid_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count); + const char *buf, size_t count); static DEVICE_ATTR_RW(textid); static ssize_t remaining_steps_show(struct device *dev, - struct device_attribute *attr, char *buf); + struct device_attribute *attr, char *buf); static ssize_t remaining_steps_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count); +struct device_attribute *attr, +const char *buf, size_t count); static DEVICE_ATTR_RW(remaining_steps); static ssize_t chipsetready_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count); + struct device_attribute *attr, + const char *buf, size_t count); static DEVICE_ATTR_WO(chipsetready); static ssize_t devicedisabled_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count); + struct device_attribute *attr, + const char *buf, size_t count); static DEVICE_ATTR_WO(devicedisabled); static ssize_t deviceenabled_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count); + struct device_attribute *attr, + const char *buf, size_t count); static DEVICE_ATTR_WO(deviceenabled); static struct attribute *visorchipset_install_attrs[] = { @@ -360,8 +367,8 @@ static ssize_t toolaction_show(struct device *dev, u8 toolAction; visorchannel_read(ControlVm_channel, - offsetof(struct spar_controlvm_channel_protocol, - tool_action), &toolAction, sizeof(u8)); + offsetof(struct spar_controlvm_channel_protocol, + tool_action), &toolAction, sizeof(u8)); return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction); } @@ -376,8 +383,9 @@ static ssize_t toolaction_store(struct device *dev, return -EINVAL; ret = visorchannel_write(ControlVm_channel, - offsetof(struct spar_controlvm_channel_protocol, tool_action), - &toolAction, sizeof(u8)); +offsetof(struct spar_controlvm_channel_protocol, + tool_action), + &toolAction, s
[PATCH 26/71] staging: unisys: Parahotplug_request_list camel case
From: Jeffrey Changed the static LIST_HEAD to parahotplug_request_list Parahotplug_request => parahotplug_request Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 7e1b176..f880f23 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -223,7 +223,7 @@ struct parahotplug_request { struct controlvm_message msg; }; -static LIST_HEAD(Parahotplug_request_list); +static LIST_HEAD(parahotplug_request_list); static DEFINE_SPINLOCK(Parahotplug_request_list_lock); /* lock for above */ static void parahotplug_process_list(void); @@ -1680,7 +1680,7 @@ parahotplug_process_list(void) spin_lock(&Parahotplug_request_list_lock); - list_for_each_safe(pos, tmp, &Parahotplug_request_list) { + list_for_each_safe(pos, tmp, ¶hotplug_request_list) { struct parahotplug_request *req = list_entry(pos, struct parahotplug_request, list); if (time_after_eq(jiffies, req->expiration)) { @@ -1711,7 +1711,7 @@ parahotplug_request_complete(int id, u16 active) spin_lock(&Parahotplug_request_list_lock); /* Look for a request matching "id". */ - list_for_each_safe(pos, tmp, &Parahotplug_request_list) { + list_for_each_safe(pos, tmp, ¶hotplug_request_list) { struct parahotplug_request *req = list_entry(pos, struct parahotplug_request, list); if (req->id == id) { @@ -1773,7 +1773,7 @@ parahotplug_process_message(struct controlvm_message *inmsg) * indicated it's done. */ spin_lock(&Parahotplug_request_list_lock); - list_add_tail(&(req->list), &Parahotplug_request_list); + list_add_tail(&(req->list), ¶hotplug_request_list); spin_unlock(&Parahotplug_request_list_lock); parahotplug_request_kickoff(req); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 42/71] staging: unisys: remainingSteps camel cases
From: Jeffrey Changed the camel case of remainingSteps in the static ssize_ts of remaining_steps_show and remaining_steps_store remainingSteps => remainingsteps Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index b7da582..d3070dd 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -488,29 +488,29 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr, static ssize_t remaining_steps_show(struct device *dev, struct device_attribute *attr, char *buf) { - u16 remainingSteps; + u16 remainingsteps; visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, installation_remaining_steps), - &remainingSteps, sizeof(u16)); - return scnprintf(buf, PAGE_SIZE, "%hu\n", remainingSteps); + &remainingsteps, sizeof(u16)); + return scnprintf(buf, PAGE_SIZE, "%hu\n", remainingsteps); } static ssize_t remaining_steps_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - u16 remainingSteps; + u16 remainingsteps; int ret; - if (kstrtou16(buf, 10, &remainingSteps) != 0) + if (kstrtou16(buf, 10, &remainingsteps) != 0) return -EINVAL; ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, installation_remaining_steps), - &remainingSteps, sizeof(u16)); + &remainingsteps, sizeof(u16)); if (ret) return ret; return count; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 38/71] staging: unisys: controlvm prototype camel cases
From: Jeffrey Changed the camel case msgHdr to msghdr in the static voids controlvm_respond, controlvm_respond_chipset_init, & controlvm_- respond_physdev_changestate msgHdr => msghdr Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 5e7def3..83382ec 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -351,13 +351,13 @@ static struct platform_device visorchipset_platform_device = { }; /* Function prototypes */ -static void controlvm_respond(struct controlvm_message_header *msgHdr, +static void controlvm_respond(struct controlvm_message_header *msghdr, int response); static void controlvm_respond_chipset_init( - struct controlvm_message_header *msgHdr, int response, + struct controlvm_message_header *msghdr, int response, enum ultra_chipset_feature features); static void controlvm_respond_physdev_changestate( - struct controlvm_message_header *msgHdr, int response, + struct controlvm_message_header *msghdr, int response, struct spar_segment_state state); static ssize_t toolaction_show(struct device *dev, -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 47/71] staging: unisys: visorchipset_save_message camel cases
From: Jeffrey Changed the camel cases for the void visorchipset_save_message localSavedCrashMsgOffset -> localsavedcrashmsgoffset localSavedCrashMsgCount -> localsavedcrashmsgcount Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 8e18fb1..c96473d 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -772,25 +772,25 @@ void visorchipset_save_message(struct controlvm_message *msg, enum crash_obj_type type) { - u32 localSavedCrashMsgOffset; - u16 localSavedCrashMsgCount; + u32 localsavedcrashmsgoffset; + u16 localsavedcrashmsgcount; /* get saved message count */ if (visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, saved_crash_message_count), - &localSavedCrashMsgCount, sizeof(u16)) < 0) { + &localsavedcrashmsgcount, sizeof(u16)) < 0) { LOGERR("failed to get Saved Message Count"); POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_SEVERITY_ERR); return; } - if (localSavedCrashMsgCount != CONTROLVM_CRASHMSG_MAX) { + if (localsavedcrashmsgcount != CONTROLVM_CRASHMSG_MAX) { LOGERR("Saved Message Count incorrect %d", - localSavedCrashMsgCount); + localsavedcrashmsgcount); POSTCODE_LINUX_3(CRASH_DEV_COUNT_FAILURE_PC, -localSavedCrashMsgCount, +localsavedcrashmsgcount, POSTCODE_SEVERITY_ERR); return; } @@ -799,7 +799,7 @@ visorchipset_save_message(struct controlvm_message *msg, if (visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, saved_crash_message_offset), - &localSavedCrashMsgOffset, sizeof(u32)) < 0) { + &localsavedcrashmsgoffset, sizeof(u32)) < 0) { LOGERR("failed to get Saved Message Offset"); POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_SEVERITY_ERR); @@ -808,7 +808,7 @@ visorchipset_save_message(struct controlvm_message *msg, if (type == CRASH_BUS) { if (visorchannel_write(controlvm_channel, - localSavedCrashMsgOffset, + localsavedcrashmsgoffset, msg, sizeof(struct controlvm_message)) < 0) { LOGERR("SAVE_MSG_BUS_FAILURE: Failed to write CrashCreateBusMsg!"); @@ -818,7 +818,7 @@ visorchipset_save_message(struct controlvm_message *msg, } } else { if (visorchannel_write(controlvm_channel, - localSavedCrashMsgOffset + + localsavedcrashmsgoffset + sizeof(struct controlvm_message), msg, sizeof(struct controlvm_message)) < 0) { LOGERR("SAVE_MSG_DEV_FAILURE: Failed to write CrashCreateDevMsg!"); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/71] staging: unisys: device_destroy_response camel cases
From: Jeffrey Changed the camel cases for the static void device_destroy_response busNo -> busno devNo -> devno Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index a0371de..dca74d4 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -236,7 +236,7 @@ static struct visorchipset_busdev_notifiers busdev_client_notifiers; static void bus_create_response(ulong busno, int response); static void bus_destroy_response(ulong busno, int response); static void device_create_response(ulong busno, ulong devno, int response); -static void device_destroy_response(ulong busNo, ulong devNo, int response); +static void device_destroy_response(ulong busno, ulong devno, int response); static void device_resume_response(ulong busNo, ulong devNo, int response); static struct visorchipset_busdev_responders BusDev_Responders = { @@ -2185,9 +2185,9 @@ device_create_response(ulong busno, ulong devno, int response) } static void -device_destroy_response(ulong busNo, ulong devNo, int response) +device_destroy_response(ulong busno, ulong devno, int response) { - device_responder(CONTROLVM_DEVICE_DESTROY, busNo, devNo, response); + device_responder(CONTROLVM_DEVICE_DESTROY, busno, devno, response); } void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/71] stating: unisys: Periodic_controlvm_workqueue camel case
From: Jeffrey Changed this static struct pointer to periodic_controlvm_workqueue Periodic_controlvm_workqueue => periodic_controlvm_workqueue Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 2edf841..58ffe19 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -68,7 +68,7 @@ static int clientregistered; static u8 chipset_events[MAX_CHIPSET_EVENTS] = { 0, 0 }; static struct delayed_work periodic_controlvm_work; -static struct workqueue_struct *Periodic_controlvm_workqueue; +static struct workqueue_struct *periodic_controlvm_workqueue; static DEFINE_SEMAPHORE(NotifierLock); typedef struct { @@ -2049,7 +2049,7 @@ Away: } } - queue_delayed_work(Periodic_controlvm_workqueue, + queue_delayed_work(periodic_controlvm_workqueue, &periodic_controlvm_work, poll_jiffies); } @@ -2162,7 +2162,7 @@ Away: poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW; - queue_delayed_work(Periodic_controlvm_workqueue, + queue_delayed_work(periodic_controlvm_workqueue, &periodic_controlvm_work, poll_jiffies); } @@ -2455,10 +2455,10 @@ visorchipset_init(void) else INIT_DELAYED_WORK(&periodic_controlvm_work, controlvm_periodic_work); - Periodic_controlvm_workqueue = + periodic_controlvm_workqueue = create_singlethread_workqueue("visorchipset_controlvm"); - if (Periodic_controlvm_workqueue == NULL) { + if (periodic_controlvm_workqueue == NULL) { ERRDRV("cannot create controlvm workqueue: (status=%d)\n", -ENOMEM); POSTCODE_LINUX_2(CREATE_WORKQUEUE_FAILED_PC, @@ -2468,7 +2468,7 @@ visorchipset_init(void) } most_recent_message_jiffies = jiffies; poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; - rc = queue_delayed_work(Periodic_controlvm_workqueue, + rc = queue_delayed_work(periodic_controlvm_workqueue, &periodic_controlvm_work, poll_jiffies); if (rc < 0) { ERRDRV("queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, Poll_jiffies): error (status=%d)\n", rc); @@ -2508,9 +2508,9 @@ visorchipset_exit(void) ; } else { cancel_delayed_work(&periodic_controlvm_work); - flush_workqueue(Periodic_controlvm_workqueue); - destroy_workqueue(Periodic_controlvm_workqueue); - Periodic_controlvm_workqueue = NULL; + flush_workqueue(periodic_controlvm_workqueue); + destroy_workqueue(periodic_controlvm_workqueue); + periodic_controlvm_workqueue = NULL; destroy_controlvm_payload_info(&ControlVm_payload_info); } Test_Vnic_channel = NULL; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 44/71] staging: unisys: devInfo_clear camel case
From: Jeffrey Changed the static void devInfo_clear to devinfo_clear devInfo_clear => devinfo_clear Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index ef7bd4f..1ceb016 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -565,7 +565,7 @@ businfo_clear(void *v) } static void -devInfo_clear(void *v) +devinfo_clear(void *v) { struct visorchipset_device_info *p = (struct visorchipset_device_info *)(v); @@ -656,7 +656,7 @@ cleanup_controlvm_structures(void) } list_for_each_entry_safe(di, tmp_di, &devinfolist, entry) { - devInfo_clear(di); + devinfo_clear(di); list_del(&di->entry); kfree(di); } @@ -936,7 +936,7 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, controlvm_respond(&p->pending_msg_hdr, response); p->pending_msg_hdr.id = CONTROLVM_INVALID; if (need_clear) - devInfo_clear(p); + devinfo_clear(p); } static void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/71] staging: unisys: Most_recent_message_jiffies
From: Jeffrey Changed the static ulong to most_recent_message_jiffies Most_recent_message_jiffies => most_recent_message_jiffies Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 6fe2495..9f52d5c 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -51,7 +51,7 @@ */ #define MIN_IDLE_SECONDS 10 static ulong poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; -static ulong Most_recent_message_jiffies; /* when we got our last +static ulong most_recent_message_jiffies; /* when we got our last * controlvm message */ static inline char * NONULLSTR(char *s) @@ -2009,7 +2009,7 @@ controlvm_periodic_work(struct work_struct *work) handle_command_failed = FALSE; while (gotACommand && (!handle_command_failed)) { - Most_recent_message_jiffies = jiffies; + most_recent_message_jiffies = jiffies; if (handle_command(inmsg, visorchannel_get_physaddr (ControlVm_channel))) @@ -2033,7 +2033,7 @@ controlvm_periodic_work(struct work_struct *work) Away: if (time_after(jiffies, - Most_recent_message_jiffies + (HZ * MIN_IDLE_SECONDS))) { + most_recent_message_jiffies + (HZ * MIN_IDLE_SECONDS))) { /* it's been longer than MIN_IDLE_SECONDS since we * processed our last controlvm message; slow down the * polling @@ -2466,7 +2466,7 @@ visorchipset_init(void) rc = -ENOMEM; goto Away; } - Most_recent_message_jiffies = jiffies; + most_recent_message_jiffies = jiffies; poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; rc = queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, poll_jiffies); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/71] staging: unisys: atomic_t camel case
From: Jeffrey Changed the varaible Visorchipset_cache_buffers_in_use to visorchipset_cache_buffers_in_use Visorchipset_cache_buffer_in_use =>visorchipset_cache_buffer_in_use Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index ed06d7b..7e1b176 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -214,7 +214,7 @@ struct putfile_request { int completion_status; }; -static atomic_t Visorchipset_cache_buffers_in_use = ATOMIC_INIT(0); +static atomic_t visorchipset_cache_buffers_in_use = ATOMIC_INIT(0); struct parahotplug_request { struct list_head list; @@ -2291,7 +2291,7 @@ visorchipset_cache_alloc(struct kmem_cache *pool, BOOL ok_to_block, LOGERR("kmem_cache_alloc failed early @%s:%d\n", fn, ln); return NULL; } - atomic_inc(&Visorchipset_cache_buffers_in_use); + atomic_inc(&visorchipset_cache_buffers_in_use); return p; } @@ -2304,7 +2304,7 @@ visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln) LOGERR("NULL pointer @%s:%d\n", fn, ln); return; } - atomic_dec(&Visorchipset_cache_buffers_in_use); + atomic_dec(&visorchipset_cache_buffers_in_use); kmem_cache_free(pool, p); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/71] staging: unisys: Periodic_controlvm_work camel case
From: Jeffrey Changed this camel case to periodic_controlvm_work Periodic_controlvm_work => periodic_controlvm_work Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 9f52d5c..2edf841 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -67,7 +67,7 @@ static int clientregistered; #define MAX_CHIPSET_EVENTS 2 static u8 chipset_events[MAX_CHIPSET_EVENTS] = { 0, 0 }; -static struct delayed_work Periodic_controlvm_work; +static struct delayed_work periodic_controlvm_work; static struct workqueue_struct *Periodic_controlvm_workqueue; static DEFINE_SEMAPHORE(NotifierLock); @@ -2050,7 +2050,7 @@ Away: } queue_delayed_work(Periodic_controlvm_workqueue, - &Periodic_controlvm_work, poll_jiffies); + &periodic_controlvm_work, poll_jiffies); } static void @@ -2163,7 +2163,7 @@ Away: poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW; queue_delayed_work(Periodic_controlvm_workqueue, - &Periodic_controlvm_work, poll_jiffies); + &periodic_controlvm_work, poll_jiffies); } static void @@ -2450,10 +2450,10 @@ visorchipset_init(void) } else { /* if booting in a crash kernel */ if (visorchipset_crash_kernel) - INIT_DELAYED_WORK(&Periodic_controlvm_work, + INIT_DELAYED_WORK(&periodic_controlvm_work, setup_crash_devices_work_queue); else - INIT_DELAYED_WORK(&Periodic_controlvm_work, + INIT_DELAYED_WORK(&periodic_controlvm_work, controlvm_periodic_work); Periodic_controlvm_workqueue = create_singlethread_workqueue("visorchipset_controlvm"); @@ -2469,7 +2469,7 @@ visorchipset_init(void) most_recent_message_jiffies = jiffies; poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; rc = queue_delayed_work(Periodic_controlvm_workqueue, - &Periodic_controlvm_work, poll_jiffies); + &periodic_controlvm_work, poll_jiffies); if (rc < 0) { ERRDRV("queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, Poll_jiffies): error (status=%d)\n", rc); POSTCODE_LINUX_2(QUEUE_DELAYED_WORK_PC, @@ -2507,7 +2507,7 @@ visorchipset_exit(void) if (visorchipset_disable_controlvm) { ; } else { - cancel_delayed_work(&Periodic_controlvm_work); + cancel_delayed_work(&periodic_controlvm_work); flush_workqueue(Periodic_controlvm_workqueue); destroy_workqueue(Periodic_controlvm_workqueue); Periodic_controlvm_workqueue = NULL; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/71] staging: unisys: Poll_jiffies camel case
From: Jeffrey Changed the static ulong Poll_jiffies to poll_jiffies using refactor and rename Poll_jiffies => poll_jiffies Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index fef28c0..6fe2495 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -50,7 +50,7 @@ * message, we switch back to fast polling mode. */ #define MIN_IDLE_SECONDS 10 -static ulong Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; +static ulong poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; static ulong Most_recent_message_jiffies; /* when we got our last * controlvm message */ static inline char * @@ -2038,19 +2038,19 @@ Away: * processed our last controlvm message; slow down the * polling */ - if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_SLOW) { + if (poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_SLOW) { LOGINF("switched to slow controlvm polling"); - Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW; + poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW; } } else { - if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_FAST) { - Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; + if (poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_FAST) { + poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; LOGINF("switched to fast controlvm polling"); } } queue_delayed_work(Periodic_controlvm_workqueue, - &Periodic_controlvm_work, Poll_jiffies); + &Periodic_controlvm_work, poll_jiffies); } static void @@ -2160,10 +2160,10 @@ setup_crash_devices_work_queue(struct work_struct *work) Away: - Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW; + poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW; queue_delayed_work(Periodic_controlvm_workqueue, - &Periodic_controlvm_work, Poll_jiffies); + &Periodic_controlvm_work, poll_jiffies); } static void @@ -2467,9 +2467,9 @@ visorchipset_init(void) goto Away; } Most_recent_message_jiffies = jiffies; - Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; + poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; rc = queue_delayed_work(Periodic_controlvm_workqueue, - &Periodic_controlvm_work, Poll_jiffies); + &Periodic_controlvm_work, poll_jiffies); if (rc < 0) { ERRDRV("queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, Poll_jiffies): error (status=%d)\n", rc); POSTCODE_LINUX_2(QUEUE_DELAYED_WORK_PC, -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/71] staging: unisys: Controlvm_payload_info camel case
From: Jeffrey Changed this variable to controlvm_payload_info Controlvm_payload_info => controlvm_payload_info Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 67d959e..0094401 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -112,7 +112,7 @@ typedef struct { } CONTROLVM_PAYLOAD_INFO; /* Manages the request payload in the controlvm channel */ -static CONTROLVM_PAYLOAD_INFO ControlVm_payload_info; +static CONTROLVM_PAYLOAD_INFO controlvm_payload_info; static struct channel_header *test_vnic_channel; @@ -1469,7 +1469,7 @@ initialize_controlvm_payload(void) } initialize_controlvm_payload_info(phys_addr, payloadOffset, payloadBytes, - &ControlVm_payload_info); + &controlvm_payload_info); } /* Send ACTION=online for DEVPATH=/sys/devices/platform/visorchipset. @@ -2386,7 +2386,7 @@ visorchipset_init(void) memset(&BusDev_Server_Notifiers, 0, sizeof(BusDev_Server_Notifiers)); memset(&BusDev_Client_Notifiers, 0, sizeof(BusDev_Client_Notifiers)); - memset(&ControlVm_payload_info, 0, sizeof(ControlVm_payload_info)); + memset(&controlvm_payload_info, 0, sizeof(controlvm_payload_info)); memset(&LiveDump_info, 0, sizeof(LiveDump_info)); atomic_set(&LiveDump_info.buffers_in_use, 0); @@ -2511,7 +2511,7 @@ visorchipset_exit(void) flush_workqueue(periodic_controlvm_workqueue); destroy_workqueue(periodic_controlvm_workqueue); periodic_controlvm_workqueue = NULL; - destroy_controlvm_payload_info(&ControlVm_payload_info); + destroy_controlvm_payload_info(&controlvm_payload_info); } test_vnic_channel = NULL; if (Putfile_buffer_list_pool) { -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/71] staging: unisys: controlvm_message_packet camel case
From: Jeffrey Changed the camel case g_DeviceChangeStatePacket to g_deicechange- statepacket g_DeviceChangeStatePacket => g_devicechangestatepacket Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 4a1b69b..add38d5 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -84,7 +84,7 @@ static const uuid_le ultradiagpoolchannelprotocolguid = /* 0xff is an invalid Bus/Device number */ static ulong g_diagpoolbusno = 0xff; static ulong g_diagpooldevno = 0xff; -static struct controlvm_message_packet g_DeviceChangeStatePacket; +static struct controlvm_message_packet g_devicechangestatepacket; /* Only VNIC and VHBA channels are sent to visorclientbus (aka * "visorhackbus") @@ -719,11 +719,11 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response) /* For DiagPool channel DEVICE_CHANGESTATE, we need to send * back the deviceChangeState structure in the packet. */ if (msgHdr->id == CONTROLVM_DEVICE_CHANGESTATE && - g_DeviceChangeStatePacket.device_change_state.bus_no == + g_devicechangestatepacket.device_change_state.bus_no == g_diagpoolbusno && - g_DeviceChangeStatePacket.device_change_state.dev_no == + g_devicechangestatepacket.device_change_state.dev_no == g_diagpooldevno) - outmsg.cmd = g_DeviceChangeStatePacket; + outmsg.cmd = g_devicechangestatepacket; if (outmsg.hdr.flags.test_message == 1) { LOGINF("%s controlvm_msg=0x%x response=%d for test message", __func__, outmsg.hdr.id, response); @@ -1884,7 +1884,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) /* when sending back the response to Command */ my_device_changestate(&inmsg); g_diagmsghdr = inmsg.hdr; - g_DeviceChangeStatePacket = inmsg.cmd; + g_devicechangestatepacket = inmsg.cmd; break; } break; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/71] staging: unisys: Putfile_buffer_list_pool camel case
From: Jeffrey Changed the static struct Putfile_buffer_list_pool to putfile_buffer_list_pool Putfile_buffer_list_pool => putfile_buffer_list_pool Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 4b717cd..401b5ee 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -142,7 +142,7 @@ static BOOL ControlVm_Pending_Msg_Valid = FALSE; /* Pool of struct putfile_buffer_entry, for keeping track of pending (incoming) * TRANSMIT_FILE PutFile payloads. */ -static struct kmem_cache *Putfile_buffer_list_pool; +static struct kmem_cache *putfile_buffer_list_pool; static const char putfile_buffer_list_pool_name[] = "controlvm_putfile_buffer_list_pool"; @@ -2435,11 +2435,11 @@ visorchipset_init(void) memset(&g_deldumpmsghdr, 0, sizeof(struct controlvm_message_header)); - Putfile_buffer_list_pool = + putfile_buffer_list_pool = kmem_cache_create(putfile_buffer_list_pool_name, sizeof(struct putfile_buffer_entry), 0, SLAB_HWCACHE_ALIGN, NULL); - if (!Putfile_buffer_list_pool) { + if (!putfile_buffer_list_pool) { ERRDRV("failed to alloc Putfile_buffer_list_pool: (status=-1)\n"); POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR); rc = -1; @@ -2514,9 +2514,9 @@ visorchipset_exit(void) destroy_controlvm_payload_info(&controlvm_payload_info); } test_vnic_channel = NULL; - if (Putfile_buffer_list_pool) { - kmem_cache_destroy(Putfile_buffer_list_pool); - Putfile_buffer_list_pool = NULL; + if (putfile_buffer_list_pool) { + kmem_cache_destroy(putfile_buffer_list_pool); + putfile_buffer_list_pool = NULL; } cleanup_controlvm_structures(); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 60/71] staging: unisys: initialize_controlvm_payload camel case
From: Jeffrey Fixed the static void initialize_controlvm_payload camel cases payloadOffset -> payloadoffset payloadBytes -> payloadbytes Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 78cb05c..c09b554 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1446,13 +1446,13 @@ static void initialize_controlvm_payload(void) { HOSTADDRESS phys_addr = visorchannel_get_physaddr(controlvm_channel); - u64 payloadOffset = 0; - u32 payloadBytes = 0; + u64 payloadoffset = 0; + u32 payloadbytes = 0; if (visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, request_payload_offset), - &payloadOffset, sizeof(payloadOffset)) < 0) { + &payloadoffset, sizeof(payloadoffset)) < 0) { LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!"); POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC, POSTCODE_SEVERITY_ERR); @@ -1461,14 +1461,14 @@ initialize_controlvm_payload(void) if (visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, request_payload_bytes), - &payloadBytes, sizeof(payloadBytes)) < 0) { + &payloadbytes, sizeof(payloadbytes)) < 0) { LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!"); POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC, POSTCODE_SEVERITY_ERR); return; } initialize_controlvm_payload_info(phys_addr, - payloadOffset, payloadBytes, + payloadoffset, payloadbytes, &controlvm_payload_info); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 32/71] staging: unisys: device_resume_response camel cases
From: Jeffrey Changed the camel cases fore the static void device_resume_response busNo -> busno devNo -> devno Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index dca74d4..1ef4487 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -237,7 +237,7 @@ static void bus_create_response(ulong busno, int response); static void bus_destroy_response(ulong busno, int response); static void device_create_response(ulong busno, ulong devno, int response); static void device_destroy_response(ulong busno, ulong devno, int response); -static void device_resume_response(ulong busNo, ulong devNo, int response); +static void device_resume_response(ulong busno, ulong devno, int response); static struct visorchipset_busdev_responders BusDev_Responders = { .bus_create = bus_create_response, @@ -2200,10 +2200,10 @@ visorchipset_device_pause_response(ulong bus_no, ulong dev_no, int response) EXPORT_SYMBOL_GPL(visorchipset_device_pause_response); static void -device_resume_response(ulong busNo, ulong devNo, int response) +device_resume_response(ulong busno, ulong devno, int response) { device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE, -busNo, devNo, response, +busno, devno, response, segment_state_running); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/71] staging: unisys: static const uuid_le camel case
From: Jeffrey Changed the uuid_le UltraDiagpoolChannelProtocolGuid to ultradiagpoolchannelprotocolguid in visorchipset_main.c UltraDiagpoolChannelProtocolGuid => ultradiagpoolchannelprotocolguid Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 1ad243f..566fef7 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -79,7 +79,7 @@ typedef struct { static struct controlvm_message_header g_diagmsghdr; static struct controlvm_message_header g_chipsetmsghdr; static struct controlvm_message_header g_deldumpmsghdr; -static const uuid_le UltraDiagPoolChannelProtocolGuid = +static const uuid_le ultradiagpoolchannelprotocolguid = SPAR_DIAG_POOL_CHANNEL_PROTOCOL_UUID; /* 0xff is an invalid Bus/Device number */ static ulong g_diagpoolBusNo = 0xff; @@ -97,7 +97,7 @@ static struct controlvm_message_packet g_DeviceChangeStatePacket; #define FOR_VISORBUS(channel_type_guid) (!(FOR_VISORHACKBUS(channel_type_guid))) #define is_diagpool_channel(channel_type_guid) \ -(uuid_le_cmp(channel_type_guid, UltraDiagPoolChannelProtocolGuid) == 0) +(uuid_le_cmp(channel_type_guid, ultradiagpoolchannelprotocolguid) == 0) static LIST_HEAD(BusInfoList); static LIST_HEAD(DevInfoList); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 43/71] staging: unisys: busInfo_clear camel cases
From: Jeffrey Chagned the static void's name to businfo_clear busInfo_clear => businfo_clear Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index d3070dd..ef7bd4f 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -546,7 +546,7 @@ testUnicode(void) #endif static void -busInfo_clear(void *v) +businfo_clear(void *v) { struct visorchipset_bus_info *p = (struct visorchipset_bus_info *)(v); @@ -650,7 +650,7 @@ cleanup_controlvm_structures(void) struct visorchipset_device_info *di, *tmp_di; list_for_each_entry_safe(bi, tmp_bi, &businfolist, entry) { - busInfo_clear(bi); + businfo_clear(bi); list_del(&bi->entry); kfree(bi); } @@ -864,7 +864,7 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response) controlvm_respond(&p->pending_msg_hdr, response); p->pending_msg_hdr.id = CONTROLVM_INVALID; if (need_clear) { - busInfo_clear(p); + businfo_clear(p); delbusdevices(&devinfolist, busNo); } } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/71] staging: unisys: Putfile_request_list camel case
From: Jeffrey Changed the static LIST_HEAD to putfile_request_list Putfile_request_list => putfile_request_list Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 401b5ee..ed06d7b 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -158,7 +158,7 @@ struct putfile_buffer_entry { * Each entry in this list identifies an outstanding TRANSMIT_FILE * conversation. */ -static LIST_HEAD(Putfile_request_list); +static LIST_HEAD(putfile_request_list); /* This describes a buffer and its current state of transfer (e.g., how many * bytes have already been supplied as putfile data, and how many bytes are -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/71] staging: unisys: device_create_response camel cases
From: Jeffrey Changed the camel cases for ethe static void device_create_response busNo => busno devNo => devno Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index f74210f..a0371de 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -235,7 +235,7 @@ static struct visorchipset_busdev_notifiers busdev_client_notifiers; static void bus_create_response(ulong busno, int response); static void bus_destroy_response(ulong busno, int response); -static void device_create_response(ulong busNo, ulong devNo, int response); +static void device_create_response(ulong busno, ulong devno, int response); static void device_destroy_response(ulong busNo, ulong devNo, int response); static void device_resume_response(ulong busNo, ulong devNo, int response); @@ -2179,9 +2179,9 @@ bus_destroy_response(ulong busno, int response) } static void -device_create_response(ulong busNo, ulong devNo, int response) +device_create_response(ulong busno, ulong devno, int response) { - device_responder(CONTROLVM_DEVICE_CREATE, busNo, devNo, response); + device_responder(CONTROLVM_DEVICE_CREATE, busno, devno, response); } static void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 52/71] staging: unisys: device_epilog camel case
From: Jeffrey Changed the camel cases in the static void device_epilog busNo -> busno devNo -> devNo msgHdr -> msghdr needResponse -> needresponse pDevInfo -> pdevinfo Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 26cfb59..217d628 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1007,40 +1007,40 @@ bus_epilog(u32 busno, } static void -device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, - struct controlvm_message_header *msgHdr, int response, - BOOL needResponse, BOOL for_visorbus) +device_epilog(u32 busno, u32 devno, struct spar_segment_state state, u32 cmd, + struct controlvm_message_header *msghdr, int response, + BOOL needresponse, BOOL for_visorbus) { struct visorchipset_busdev_notifiers *notifiers = NULL; BOOL notified = FALSE; - struct visorchipset_device_info *pDevInfo = - finddevice(&devinfolist, busNo, devNo); + struct visorchipset_device_info *pdevinfo = + finddevice(&devinfolist, busno, devno); char *envp[] = { "SPARSP_DIAGPOOL_PAUSED_STATE = 1", NULL }; - if (!pDevInfo) { - LOGERR("HUH? bad busNo=%d, devNo=%d", busNo, devNo); + if (!pdevinfo) { + LOGERR("HUH? bad busNo=%d, devNo=%d", busno, devno); return; } if (for_visorbus) notifiers = &busdev_server_notifiers; else notifiers = &busdev_client_notifiers; - if (needResponse) { - memcpy(&pDevInfo->pending_msg_hdr, msgHdr, + if (needresponse) { + memcpy(&pdevinfo->pending_msg_hdr, msghdr, sizeof(struct controlvm_message_header)); } else { - pDevInfo->pending_msg_hdr.id = CONTROLVM_INVALID; + pdevinfo->pending_msg_hdr.id = CONTROLVM_INVALID; } down(¬ifierlock); if (response >= 0) { switch (cmd) { case CONTROLVM_DEVICE_CREATE: if (notifiers->device_create) { - (*notifiers->device_create) (busNo, devNo); + (*notifiers->device_create) (busno, devno); notified = TRUE; } break; @@ -1050,8 +1050,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, state.operating == segment_state_running.operating) { if (notifiers->device_resume) { - (*notifiers->device_resume) (busNo, -devNo); + (*notifiers->device_resume) (busno, +devno); notified = TRUE; } } @@ -1063,8 +1063,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, * where server is lost */ if (notifiers->device_pause) { - (*notifiers->device_pause) (busNo, - devNo); + (*notifiers->device_pause) (busno, + devno); notified = TRUE; } } else if (state.alive == segment_state_paused.alive && @@ -1073,10 +1073,10 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, /* this is lite pause where channel is * still valid just 'pause' of it */ - if (busNo == g_diagpoolbusno && - devNo == g_diagpooldevno) { + if (busno == g_diagpoolbusno && + devno == g_diagpooldevno) { LOGINF("DEVICE_CHANGESTATE(DiagpoolChannel busNo=%d devNo=%d is pausing...)", -
[PATCH 27/71] staging: unisys: visorchipset_busdev_notifiers camel cases
From: Jeffrey Changed the camel cases that manages the info for a CONTROLVM_DUMP_ CAPTURESTATE and CONTROLVM/REPORTEVENT BusDev_Server_Notifiers => busdev_server_notifiers BusDev_Client_Notifiers => busdev_client_notifiers Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index f880f23..7bb2171 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -230,8 +230,8 @@ static void parahotplug_process_list(void); /* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE / * CONTROLVM_REPORTEVENT. */ -static struct visorchipset_busdev_notifiers BusDev_Server_Notifiers; -static struct visorchipset_busdev_notifiers BusDev_Client_Notifiers; +static struct visorchipset_busdev_notifiers busdev_server_notifiers; +static struct visorchipset_busdev_notifiers busdev_client_notifiers; static void bus_create_response(ulong busNo, int response); static void bus_destroy_response(ulong busNo, int response); @@ -602,11 +602,11 @@ visorchipset_register_busdev_server( { down(¬ifierlock); if (notifiers == NULL) { - memset(&BusDev_Server_Notifiers, 0, - sizeof(BusDev_Server_Notifiers)); + memset(&busdev_server_notifiers, 0, + sizeof(busdev_server_notifiers)); serverregistered = 0; /* clear flag */ } else { - BusDev_Server_Notifiers = *notifiers; + busdev_server_notifiers = *notifiers; serverregistered = 1; /* set flag */ } if (responders) @@ -627,11 +627,11 @@ visorchipset_register_busdev_client( { down(¬ifierlock); if (notifiers == NULL) { - memset(&BusDev_Client_Notifiers, 0, - sizeof(BusDev_Client_Notifiers)); + memset(&busdev_client_notifiers, 0, + sizeof(busdev_client_notifiers)); clientregistered = 0; /* clear flag */ } else { - BusDev_Client_Notifiers = *notifiers; + busdev_client_notifiers = *notifiers; clientregistered = 1; /* set flag */ } if (responders) @@ -972,24 +972,24 @@ bus_epilog(u32 busNo, * either server or client devices * - BusDev_Client can handle ONLY client * devices */ - if (BusDev_Server_Notifiers.bus_create) { - (*BusDev_Server_Notifiers.bus_create) (busNo); + if (busdev_server_notifiers.bus_create) { + (*busdev_server_notifiers.bus_create) (busNo); notified = TRUE; } if ((!pBusInfo->flags.server) /*client */ && - BusDev_Client_Notifiers.bus_create) { - (*BusDev_Client_Notifiers.bus_create) (busNo); + busdev_client_notifiers.bus_create) { + (*busdev_client_notifiers.bus_create) (busNo); notified = TRUE; } break; case CONTROLVM_BUS_DESTROY: - if (BusDev_Server_Notifiers.bus_destroy) { - (*BusDev_Server_Notifiers.bus_destroy) (busNo); + if (busdev_server_notifiers.bus_destroy) { + (*busdev_server_notifiers.bus_destroy) (busNo); notified = TRUE; } if ((!pBusInfo->flags.server) /*client */ && - BusDev_Client_Notifiers.bus_destroy) { - (*BusDev_Client_Notifiers.bus_destroy) (busNo); + busdev_client_notifiers.bus_destroy) { + (*busdev_client_notifiers.bus_destroy) (busNo); notified = TRUE; } break; @@ -1026,9 +1026,9 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, return; } if (for_visorbus) - notifiers = &BusDev_Server_Notifiers; + notifiers = &busdev_server_notifiers; else - notifiers = &BusDev_Client_Notifiers; + notifiers = &busdev_client_notifiers; if (needResponse) { memcpy(&pDevInfo->pending_msg_hdr, msgHdr, sizeof(struct controlvm_message_header)); @@ -2384,8 +2384,8 @
[PATCH 45/71] staging: unisys: chipset_init camel cases
From: Jeffrey Cleaned up all of the camel cases in the static void chipset_init Away -> cleanups Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 1ceb016..49e5b4c 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -673,7 +673,7 @@ chipset_init(struct controlvm_message *inmsg) if (chipset_inited) { LOGERR("CONTROLVM_CHIPSET_INIT Failed: Already Done."); rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; - goto Away; + goto cleanups; } chipset_inited = 1; POSTCODE_LINUX_2(CHIPSET_INIT_EXIT_PC, POSTCODE_SEVERITY_INFO); @@ -688,7 +688,7 @@ chipset_init(struct controlvm_message *inmsg) * features-aware driver. */ features |= ULTRA_CHIPSET_FEATURE_REPLY; -Away: +cleanups: if (rc < 0) cleanup_controlvm_structures(); if (inmsg->hdr.flags.response_expected) -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/71] staging: unisys: Livedump_info camel case
From: Jeffrey Changed this static struct LIVEDUMP_INFO into livedump_info Livedump_info = livedump_info Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 0094401..6536093 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -129,7 +129,7 @@ typedef struct { /* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE / * CONTROLVM_DUMP_GETTEXTDUMP / CONTROLVM_DUMP_COMPLETE conversation. */ -static LIVEDUMP_INFO LiveDump_info; +static LIVEDUMP_INFO livedump_info; /* The following globals are used to handle the scenario where we are unable to * offload the payload from a controlvm message due to memory requirements. In @@ -2387,8 +2387,8 @@ visorchipset_init(void) memset(&BusDev_Server_Notifiers, 0, sizeof(BusDev_Server_Notifiers)); memset(&BusDev_Client_Notifiers, 0, sizeof(BusDev_Client_Notifiers)); memset(&controlvm_payload_info, 0, sizeof(controlvm_payload_info)); - memset(&LiveDump_info, 0, sizeof(LiveDump_info)); - atomic_set(&LiveDump_info.buffers_in_use, 0); + memset(&livedump_info, 0, sizeof(livedump_info)); + atomic_set(&livedump_info.buffers_in_use, 0); if (visorchipset_testvnic) { ERRDRV("testvnic option no longer supported: (status = %d)\n", -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 69/71] staging: unisys: CONTROLVM_PAYLOAD_INFO typedef
From: Jeffrey Changed the typedef struct CONTROLVM_PAYLOAD_INFO on line 107 to a normal struct and replaced every instnace of CONTROLVM_PAYLOAD_INFO with "struct CONTROLVM_PAYLOAD_INFO" Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 6977c8d..efb1729 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -104,15 +104,15 @@ static LIST_HEAD(devinfolist); static VISORCHANNEL *controlvm_channel; -typedef struct { +struct CONTROLVM_PAYLOAD_INFO { u8 __iomem *ptr;/* pointer to base address of payload pool */ u64 offset; /* offset from beginning of controlvm * channel to beginning of payload * pool */ u32 bytes; /* number of bytes in payload pool */ -} CONTROLVM_PAYLOAD_INFO; +}; /* Manages the request payload in the controlvm channel */ -static CONTROLVM_PAYLOAD_INFO controlvm_payload_info; +static struct CONTROLVM_PAYLOAD_INFO controlvm_payload_info; static struct channel_header *test_vnic_channel; @@ -1385,12 +1385,12 @@ cleanups: /* When provided with the physical address of the controlvm channel * (phys_addr), the offset to the payload area we need to manage * (offset), and the size of this payload area (bytes), fills in the - * CONTROLVM_PAYLOAD_INFO struct. Returns TRUE for success or FALSE + * struct CONTROLVM_PAYLOAD_INFO struct. Returns TRUE for success or FALSE * for failure. */ static int initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes, - CONTROLVM_PAYLOAD_INFO *info) + struct CONTROLVM_PAYLOAD_INFO *info) { u8 __iomem *payload = NULL; int rc = CONTROLVM_RESP_SUCCESS; @@ -1401,7 +1401,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes, rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID; goto cleanups; } - memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO)); + memset(info, 0, sizeof(struct CONTROLVM_PAYLOAD_INFO)); if ((offset == 0) || (bytes == 0)) { LOGERR("CONTROLVM_PAYLOAD_INIT Failed: request_payload_offset=%llu request_payload_bytes=%llu!", (u64)offset, (u64)bytes); @@ -1433,13 +1433,13 @@ cleanups: } static void -destroy_controlvm_payload_info(CONTROLVM_PAYLOAD_INFO *info) +destroy_controlvm_payload_info(struct CONTROLVM_PAYLOAD_INFO *info) { if (info->ptr != NULL) { iounmap(info->ptr); info->ptr = NULL; } - memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO)); + memset(info, 0, sizeof(struct CONTROLVM_PAYLOAD_INFO)); } static void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 70/71] staging: unisys: LIVEDUMP_INFO typedef
From: Jeffrey Changed the typedef LIVEDUMP_INFO to a normal struct and replaced the only other instance of LIVEDUMP_INFO to "struct LIVEDUMP_INFO" on line 133 Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index efb1729..45b1760 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -116,7 +116,7 @@ static struct CONTROLVM_PAYLOAD_INFO controlvm_payload_info; static struct channel_header *test_vnic_channel; -typedef struct { +struct LIVEDUMP_INFO { struct controlvm_message_header dumpcapture_header; struct controlvm_message_header gettextdump_header; struct controlvm_message_header dumpcomplete_header; @@ -125,11 +125,12 @@ typedef struct { ulong length; atomic_t buffers_in_use; ulong destination; -} LIVEDUMP_INFO; +}; + /* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE / * CONTROLVM_DUMP_GETTEXTDUMP / CONTROLVM_DUMP_COMPLETE conversation. */ -static LIVEDUMP_INFO livedump_info; +static struct LIVEDUMP_INFO livedump_info; /* The following globals are used to handle the scenario where we are unable to * offload the payload from a controlvm message due to memory requirements. In -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 46/71] staging: unisys: controlvm camel cases
From: Jeffrey Changed the camel case of msgHdr for the static voids of controlvm_respond, controlvm_init_response, cnotrolvm_respond_- chipset_init, & controlvm_respond_physdev_changestate msgHdr => msghdr Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c| 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 49e5b4c..8e18fb1 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -697,10 +697,10 @@ cleanups: static void controlvm_init_response(struct controlvm_message *msg, - struct controlvm_message_header *msgHdr, int response) + struct controlvm_message_header *msghdr, int response) { memset(msg, 0, sizeof(struct controlvm_message)); - memcpy(&msg->hdr, msgHdr, sizeof(struct controlvm_message_header)); + memcpy(&msg->hdr, msghdr, sizeof(struct controlvm_message_header)); msg->hdr.payload_bytes = 0; msg->hdr.payload_vm_offset = 0; msg->hdr.payload_max_bytes = 0; @@ -711,14 +711,14 @@ controlvm_init_response(struct controlvm_message *msg, } static void -controlvm_respond(struct controlvm_message_header *msgHdr, int response) +controlvm_respond(struct controlvm_message_header *msghdr, int response) { struct controlvm_message outmsg; - controlvm_init_response(&outmsg, msgHdr, response); + controlvm_init_response(&outmsg, msghdr, response); /* For DiagPool channel DEVICE_CHANGESTATE, we need to send * back the deviceChangeState structure in the packet. */ - if (msgHdr->id == CONTROLVM_DEVICE_CHANGESTATE && + if (msghdr->id == CONTROLVM_DEVICE_CHANGESTATE && g_devicechangestatepacket.device_change_state.bus_no == g_diagpoolbusno && g_devicechangestatepacket.device_change_state.dev_no == @@ -737,13 +737,13 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response) } static void -controlvm_respond_chipset_init(struct controlvm_message_header *msgHdr, +controlvm_respond_chipset_init(struct controlvm_message_header *msghdr, int response, enum ultra_chipset_feature features) { struct controlvm_message outmsg; - controlvm_init_response(&outmsg, msgHdr, response); + controlvm_init_response(&outmsg, msghdr, response); outmsg.cmd.init_chipset.features = features; if (!visorchannel_signalinsert(controlvm_channel, CONTROLVM_QUEUE_REQUEST, &outmsg)) { @@ -753,12 +753,12 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msgHdr, } static void controlvm_respond_physdev_changestate( - struct controlvm_message_header *msgHdr, int response, + struct controlvm_message_header *msghdr, int response, struct spar_segment_state state) { struct controlvm_message outmsg; - controlvm_init_response(&outmsg, msgHdr, response); + controlvm_init_response(&outmsg, msghdr, response); outmsg.cmd.device_change_state.state = state; outmsg.cmd.device_change_state.flags.phys_device = 1; if (!visorchannel_signalinsert(controlvm_channel, -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/71] staging: unisys: Controlvm_pending_msg camel case
From: Jeffrey Changed this variable to controlvm_pending_msg Controlvm_pending_msg => controlvm_pending_msg Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 6536093..30685cb 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -136,7 +136,7 @@ static LIVEDUMP_INFO livedump_info; * this scenario, we simply stash the controlvm message, then attempt to * process it again the next time controlvm_periodic_work() runs. */ -static struct controlvm_message ControlVm_Pending_Msg; +static struct controlvm_message controlvm_pending_msg; static BOOL ControlVm_Pending_Msg_Valid = FALSE; /* Pool of struct putfile_buffer_entry, for keeping track of pending (incoming) @@ -1999,7 +1999,7 @@ controlvm_periodic_work(struct work_struct *work) * msg, so try to process it again * rather than reading a new one */ - inmsg = ControlVm_Pending_Msg; + inmsg = controlvm_pending_msg; ControlVm_Pending_Msg_Valid = FALSE; gotACommand = TRUE; } else { @@ -2022,7 +2022,7 @@ controlvm_periodic_work(struct work_struct *work) * reprocess it on our next loop */ handle_command_failed = TRUE; - ControlVm_Pending_Msg = inmsg; + controlvm_pending_msg = inmsg; ControlVm_Pending_Msg_Valid = TRUE; } } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/71] staging: unisys: controlvm_message_header camel case
From: Jeffrey Changed the camel cases of three controlvm_message_headers that are related to each other g_DiagMsgHdr => g_diagmsghdr g_ChipsetMsgHdr => g_chipsetmsghdr g_DelDumpMsgHdr => g_deldumpmsghdr Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 28 +++--- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 8099c21..1ad243f 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -76,9 +76,9 @@ typedef struct { unsigned int crc; } MESSAGE_ENVELOPE; -static struct controlvm_message_header g_DiagMsgHdr; -static struct controlvm_message_header g_ChipSetMsgHdr; -static struct controlvm_message_header g_DelDumpMsgHdr; +static struct controlvm_message_header g_diagmsghdr; +static struct controlvm_message_header g_chipsetmsghdr; +static struct controlvm_message_header g_deldumpmsghdr; static const uuid_le UltraDiagPoolChannelProtocolGuid = SPAR_DIAG_POOL_CHANNEL_PROTOCOL_UUID; /* 0xff is an invalid Bus/Device number */ @@ -1520,7 +1520,7 @@ chipset_ready(struct controlvm_message_header *msgHdr) /* Send CHIPSET_READY response when all modules have been loaded * and disks mounted for the partition */ - g_ChipSetMsgHdr = *msgHdr; + g_chipsetmsghdr = *msgHdr; LOGINF("Holding CHIPSET_READY response"); } } @@ -1883,7 +1883,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) /* save the hdr and cmd structures for later use */ /* when sending back the response to Command */ my_device_changestate(&inmsg); - g_DiagMsgHdr = inmsg.hdr; + g_diagmsghdr = inmsg.hdr; g_DeviceChangeStatePacket = inmsg.cmd; break; } @@ -1973,12 +1973,12 @@ controlvm_periodic_work(struct work_struct *work) * should be sent */ if (visorchipset_holdchipsetready && - (g_ChipSetMsgHdr.id != CONTROLVM_INVALID)) { + (g_chipsetmsghdr.id != CONTROLVM_INVALID)) { if (check_chipset_events() == 1) { LOGINF("Sending CHIPSET_READY response"); - controlvm_respond(&g_ChipSetMsgHdr, 0); + controlvm_respond(&g_chipsetmsghdr, 0); clear_chipset_events(); - memset(&g_ChipSetMsgHdr, 0, + memset(&g_chipsetmsghdr, 0, sizeof(struct controlvm_message_header)); } } @@ -2429,11 +2429,11 @@ visorchipset_init(void) goto Away; } - memset(&g_DiagMsgHdr, 0, sizeof(struct controlvm_message_header)); + memset(&g_diagmsghdr, 0, sizeof(struct controlvm_message_header)); - memset(&g_ChipSetMsgHdr, 0, sizeof(struct controlvm_message_header)); + memset(&g_chipsetmsghdr, 0, sizeof(struct controlvm_message_header)); - memset(&g_DelDumpMsgHdr, 0, sizeof(struct controlvm_message_header)); + memset(&g_deldumpmsghdr, 0, sizeof(struct controlvm_message_header)); Putfile_buffer_list_pool = kmem_cache_create(Putfile_buffer_list_pool_name, @@ -2521,11 +2521,11 @@ visorchipset_exit(void) cleanup_controlvm_structures(); - memset(&g_DiagMsgHdr, 0, sizeof(struct controlvm_message_header)); + memset(&g_diagmsghdr, 0, sizeof(struct controlvm_message_header)); - memset(&g_ChipSetMsgHdr, 0, sizeof(struct controlvm_message_header)); + memset(&g_chipsetmsghdr, 0, sizeof(struct controlvm_message_header)); - memset(&g_DelDumpMsgHdr, 0, sizeof(struct controlvm_message_header)); + memset(&g_deldumpmsghdr, 0, sizeof(struct controlvm_message_header)); LOGINF("Channel %s (ControlVm) disconnected", visorchannel_id(ControlVm_channel, s)); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 65/71] staging: unisys: visorchipset_init camel cases
From: Jeffrey Fixed camel cases in the static int _init at line 2365 Away -> cleanups Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 1d9aaca..3d2d435 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -2395,7 +2395,7 @@ visorchipset_init(void) x); POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, x, DIAG_SEVERITY_ERR); rc = x; - goto Away; + goto cleanups; } addr = controlvm_get_channel_address(); @@ -2426,7 +2426,7 @@ visorchipset_init(void) if (rc < 0) { ERRDRV("visorchipset_file_init(MajorDev, &ControlVm_channel): error (status=%d)\n", rc); POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR); - goto Away; + goto cleanups; } memset(&g_diagmsghdr, 0, sizeof(struct controlvm_message_header)); @@ -2443,7 +2443,7 @@ visorchipset_init(void) ERRDRV("failed to alloc Putfile_buffer_list_pool: (status=-1)\n"); POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR); rc = -1; - goto Away; + goto cleanups; } if (visorchipset_disable_controlvm) { LOGINF("visorchipset_init:controlvm disabled"); @@ -2464,7 +2464,7 @@ visorchipset_init(void) POSTCODE_LINUX_2(CREATE_WORKQUEUE_FAILED_PC, DIAG_SEVERITY_ERR); rc = -ENOMEM; - goto Away; + goto cleanups; } most_recent_message_jiffies = jiffies; poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST; @@ -2474,7 +2474,7 @@ visorchipset_init(void) ERRDRV("queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, Poll_jiffies): error (status=%d)\n", rc); POSTCODE_LINUX_2(QUEUE_DELAYED_WORK_PC, DIAG_SEVERITY_ERR); - goto Away; + goto cleanups; } } @@ -2483,12 +2483,12 @@ visorchipset_init(void) ERRDRV("platform_device_register(visorchipset) failed: (status=-1)\n"); POSTCODE_LINUX_2(DEVICE_REGISTER_FAILURE_PC, DIAG_SEVERITY_ERR); rc = -1; - goto Away; + goto cleanups; } LOGINF("visorchipset device created"); POSTCODE_LINUX_2(CHIPSET_INIT_SUCCESS_PC, POSTCODE_SEVERITY_INFO); rc = 0; -Away: +cleanups: if (rc) { LOGERR("visorchipset_init failed"); POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, rc, -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/71] staging: unisys: Test_Vnic_channel camel case
From: Jeffrey Changed this channel header to test_vnic_channel in visorchipset_main.c Test_Vnic_channel => test_vnic_channel Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 882834e..992b2c3 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -114,7 +114,7 @@ typedef struct { /* Manages the request payload in the controlvm channel */ static CONTROLVM_PAYLOAD_INFO ControlVm_payload_info; -static struct channel_header *Test_Vnic_channel; +static struct channel_header *test_vnic_channel; typedef struct { struct controlvm_message_header Dumpcapture_header; @@ -2513,7 +2513,7 @@ visorchipset_exit(void) periodic_controlvm_workqueue = NULL; destroy_controlvm_payload_info(&ControlVm_payload_info); } - Test_Vnic_channel = NULL; + test_vnic_channel = NULL; if (Putfile_buffer_list_pool) { kmem_cache_destroy(Putfile_buffer_list_pool); Putfile_buffer_list_pool = NULL; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/71] staging: unisys: bus_destroy_response camel cases
From: Jeffrey Changed the camel cases for the static void bus_destroy_response busNo => busno Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index fa74543..f74210f 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -234,7 +234,7 @@ static struct visorchipset_busdev_notifiers busdev_server_notifiers; static struct visorchipset_busdev_notifiers busdev_client_notifiers; static void bus_create_response(ulong busno, int response); -static void bus_destroy_response(ulong busNo, int response); +static void bus_destroy_response(ulong busno, int response); static void device_create_response(ulong busNo, ulong devNo, int response); static void device_destroy_response(ulong busNo, ulong devNo, int response); static void device_resume_response(ulong busNo, ulong devNo, int response); @@ -2173,9 +2173,9 @@ bus_create_response(ulong busno, int response) } static void -bus_destroy_response(ulong busNo, int response) +bus_destroy_response(ulong busno, int response) { - bus_responder(CONTROLVM_BUS_DESTROY, busNo, response); + bus_responder(CONTROLVM_BUS_DESTROY, busno, response); } static void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 49/71] staging: unisys: device_changestate_responder camel cases
From: Jeffrey Changed the camel cases in the static void device_changestate_responders cmdId -> cmdid busNo -> busno devNo -> devno responseState -> responsestate Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 69ff88a..fa708d3 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -870,32 +870,32 @@ bus_responder(enum controlvm_id cmdid, ulong busno, int response) } static void -device_changestate_responder(enum controlvm_id cmdId, -ulong busNo, ulong devNo, int response, -struct spar_segment_state responseState) +device_changestate_responder(enum controlvm_id cmdid, +ulong busno, ulong devno, int response, +struct spar_segment_state responsestate) { struct visorchipset_device_info *p = NULL; struct controlvm_message outmsg; - p = finddevice(&devinfolist, busNo, devNo); + p = finddevice(&devinfolist, busno, devno); if (!p) { - LOGERR("internal error; busNo=%lu, devNo=%lu", busNo, devNo); + LOGERR("internal error; busNo=%lu, devNo=%lu", busno, devno); return; } if (p->pending_msg_hdr.id == CONTROLVM_INVALID) { LOGERR("device_responder no pending msg"); return; /* no controlvm response needed */ } - if (p->pending_msg_hdr.id != cmdId) { - LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id); + if (p->pending_msg_hdr.id != cmdid) { + LOGERR("expected=%d, found=%d", cmdid, p->pending_msg_hdr.id); return; } controlvm_init_response(&outmsg, &p->pending_msg_hdr, response); - outmsg.cmd.device_change_state.bus_no = busNo; - outmsg.cmd.device_change_state.dev_no = devNo; - outmsg.cmd.device_change_state.state = responseState; + outmsg.cmd.device_change_state.bus_no = busno; + outmsg.cmd.device_change_state.dev_no = devno; + outmsg.cmd.device_change_state.state = responsestate; if (!visorchannel_signalinsert(controlvm_channel, CONTROLVM_QUEUE_REQUEST, &outmsg)) { -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 37/71] staging: unisys: platform_device camel case
From: Jeffrey Changed the static platform_device Visorchipset_platform_device to visorchipset_platform_device Visorchipset_platform_device => visorchipset_platform_device Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 6263dea..5e7def3 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -344,7 +344,7 @@ static const struct attribute_group *visorchipset_dev_groups[] = { }; /* /sys/devices/platform/visorchipset */ -static struct platform_device Visorchipset_platform_device = { +static struct platform_device visorchipset_platform_device = { .name = "visorchipset", .id = -1, .dev.groups = visorchipset_dev_groups, @@ -1081,7 +1081,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, * diag_shutdown.sh script in * the visorchipset hotplug */ kobject_uevent_env - (&Visorchipset_platform_device.dev. + (&visorchipset_platform_device.dev. kobj, KOBJ_ONLINE, envp); } } @@ -1478,7 +1478,7 @@ initialize_controlvm_payload(void) int visorchipset_chipset_ready(void) { - kobject_uevent(&Visorchipset_platform_device.dev.kobj, KOBJ_ONLINE); + kobject_uevent(&visorchipset_platform_device.dev.kobj, KOBJ_ONLINE); return CONTROLVM_RESP_SUCCESS; } EXPORT_SYMBOL_GPL(visorchipset_chipset_ready); @@ -1490,7 +1490,7 @@ visorchipset_chipset_selftest(void) char *envp[] = { env_selftest, NULL }; sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1); - kobject_uevent_env(&Visorchipset_platform_device.dev.kobj, KOBJ_CHANGE, + kobject_uevent_env(&visorchipset_platform_device.dev.kobj, KOBJ_CHANGE, envp); return CONTROLVM_RESP_SUCCESS; } @@ -1502,7 +1502,7 @@ EXPORT_SYMBOL_GPL(visorchipset_chipset_selftest); int visorchipset_chipset_notready(void) { - kobject_uevent(&Visorchipset_platform_device.dev.kobj, KOBJ_OFFLINE); + kobject_uevent(&visorchipset_platform_device.dev.kobj, KOBJ_OFFLINE); return CONTROLVM_RESP_SUCCESS; } EXPORT_SYMBOL_GPL(visorchipset_chipset_notready); @@ -1664,7 +1664,7 @@ parahotplug_request_kickoff(struct parahotplug_request *req) cmd->device_change_state.dev_no >> 3, cmd->device_change_state.dev_no & 7, req->id); - kobject_uevent_env(&Visorchipset_platform_device.dev.kobj, KOBJ_CHANGE, + kobject_uevent_env(&visorchipset_platform_device.dev.kobj, KOBJ_CHANGE, envp); } @@ -2478,8 +2478,8 @@ visorchipset_init(void) } } - Visorchipset_platform_device.dev.devt = majordev; - if (platform_device_register(&Visorchipset_platform_device) < 0) { + visorchipset_platform_device.dev.devt = majordev; + if (platform_device_register(&visorchipset_platform_device) < 0) { ERRDRV("platform_device_register(visorchipset) failed: (status=-1)\n"); POSTCODE_LINUX_2(DEVICE_REGISTER_FAILURE_PC, DIAG_SEVERITY_ERR); rc = -1; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 33/71] staging: unisys: BusDev_Responders camel case
From: Jeffrey Changed the static struct to busdev_responders BusDev_Responders => busdev_responders Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 1ef4487..5096a85 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -239,7 +239,7 @@ static void device_create_response(ulong busno, ulong devno, int response); static void device_destroy_response(ulong busno, ulong devno, int response); static void device_resume_response(ulong busno, ulong devno, int response); -static struct visorchipset_busdev_responders BusDev_Responders = { +static struct visorchipset_busdev_responders busdev_responders = { .bus_create = bus_create_response, .bus_destroy = bus_destroy_response, .device_create = device_create_response, @@ -610,7 +610,7 @@ visorchipset_register_busdev_server( serverregistered = 1; /* set flag */ } if (responders) - *responders = BusDev_Responders; + *responders = busdev_responders; if (driver_info) bus_device_info_init(driver_info, "chipset", "visorchipset", VERSION, NULL); @@ -635,7 +635,7 @@ visorchipset_register_busdev_client( clientregistered = 1; /* set flag */ } if (responders) - *responders = BusDev_Responders; + *responders = busdev_responders; if (driver_info) bus_device_info_init(driver_info, "chipset(bolts)", "visorchipset", VERSION, NULL); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/71] staging: unisys: LIST_HEAD info list camel cases
From: Jeffrey Changed the camel cases for LIST_HEAD BusInfoList and DevInfoList BusInfoList => businfolist DevInfoList => devinfolist Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 48 +++--- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index add38d5..789904a 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -99,8 +99,8 @@ static struct controlvm_message_packet g_devicechangestatepacket; #define is_diagpool_channel(channel_type_guid) \ (uuid_le_cmp(channel_type_guid, ultradiagpoolchannelprotocolguid) == 0) -static LIST_HEAD(BusInfoList); -static LIST_HEAD(DevInfoList); +static LIST_HEAD(businfolist); +static LIST_HEAD(devinfolist); static VISORCHANNEL *ControlVm_channel; @@ -649,13 +649,13 @@ cleanup_controlvm_structures(void) struct visorchipset_bus_info *bi, *tmp_bi; struct visorchipset_device_info *di, *tmp_di; - list_for_each_entry_safe(bi, tmp_bi, &BusInfoList, entry) { + list_for_each_entry_safe(bi, tmp_bi, &businfolist, entry) { busInfo_clear(bi); list_del(&bi->entry); kfree(bi); } - list_for_each_entry_safe(di, tmp_di, &DevInfoList, entry) { + list_for_each_entry_safe(di, tmp_di, &devinfolist, entry) { devInfo_clear(di); list_del(&di->entry); kfree(di); @@ -836,7 +836,7 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response) struct visorchipset_bus_info *p = NULL; BOOL need_clear = FALSE; - p = findbus(&BusInfoList, busNo); + p = findbus(&businfolist, busNo); if (!p) { LOGERR("internal error busNo=%lu", busNo); return; @@ -845,7 +845,7 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response) if ((cmdId == CONTROLVM_BUS_CREATE) && (response != (-CONTROLVM_RESP_ERROR_ALREADY_DONE))) /* undo the row we just created... */ - delbusdevices(&DevInfoList, busNo); + delbusdevices(&devinfolist, busNo); } else { if (cmdId == CONTROLVM_BUS_CREATE) p->state.created = 1; @@ -865,7 +865,7 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response) p->pending_msg_hdr.id = CONTROLVM_INVALID; if (need_clear) { busInfo_clear(p); - delbusdevices(&DevInfoList, busNo); + delbusdevices(&devinfolist, busNo); } } @@ -877,7 +877,7 @@ device_changestate_responder(enum controlvm_id cmdId, struct visorchipset_device_info *p = NULL; struct controlvm_message outmsg; - p = finddevice(&DevInfoList, busNo, devNo); + p = finddevice(&devinfolist, busNo, devNo); if (!p) { LOGERR("internal error; busNo=%lu, devNo=%lu", busNo, devNo); return; @@ -913,7 +913,7 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, struct visorchipset_device_info *p = NULL; BOOL need_clear = FALSE; - p = finddevice(&DevInfoList, busNo, devNo); + p = finddevice(&devinfolist, busNo, devNo); if (!p) { LOGERR("internal error; busNo=%lu, devNo=%lu", busNo, devNo); return; @@ -946,7 +946,7 @@ bus_epilog(u32 busNo, { BOOL notified = FALSE; - struct visorchipset_bus_info *pBusInfo = findbus(&BusInfoList, busNo); + struct visorchipset_bus_info *pBusInfo = findbus(&businfolist, busNo); if (!pBusInfo) { LOGERR("HUH? bad busNo=%d", busNo); @@ -1015,7 +1015,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, BOOL notified = FALSE; struct visorchipset_device_info *pDevInfo = - finddevice(&DevInfoList, busNo, devNo); + finddevice(&devinfolist, busNo, devNo); char *envp[] = { "SPARSP_DIAGPOOL_PAUSED_STATE = 1", NULL @@ -1113,7 +1113,7 @@ bus_create(struct controlvm_message *inmsg) int rc = CONTROLVM_RESP_SUCCESS; struct visorchipset_bus_info *pBusInfo = NULL; - pBusInfo = findbus(&BusInfoList, busNo); + pBusInfo = findbus(&businfolist, busNo); if (pBusInfo && (pBusInfo->state.created == 1)) { LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu already exists", busNo); @@ -1150,7 +1150,7 @@ bus_create(struct controlvm_message *inmsg)
[PATCH 22/71] staging: unisys: Putfile_buffer_list_pool_name camel case
From: Jeffrey Changed this static const char to putfile_buffer_list_pool_name Putfile_buffer_list_pool_name => putfile_buffer_list_pool_name Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 30685cb..4b717cd 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -143,7 +143,7 @@ static BOOL ControlVm_Pending_Msg_Valid = FALSE; * TRANSMIT_FILE PutFile payloads. */ static struct kmem_cache *Putfile_buffer_list_pool; -static const char Putfile_buffer_list_pool_name[] = +static const char putfile_buffer_list_pool_name[] = "controlvm_putfile_buffer_list_pool"; /* This identifies a data buffer that has been received via a controlvm messages @@ -2436,7 +2436,7 @@ visorchipset_init(void) memset(&g_deldumpmsghdr, 0, sizeof(struct controlvm_message_header)); Putfile_buffer_list_pool = - kmem_cache_create(Putfile_buffer_list_pool_name, + kmem_cache_create(putfile_buffer_list_pool_name, sizeof(struct putfile_buffer_entry), 0, SLAB_HWCACHE_ALIGN, NULL); if (!Putfile_buffer_list_pool) { -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 67/71] staging: unisys: Unnecessary parentheses
From: Jeffrey Removed the unnecessasry parentheses around req->list on line 1776 Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 174e90a..d8e74c6 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1773,7 +1773,7 @@ parahotplug_process_message(struct controlvm_message *inmsg) * indicated it's done. */ spin_lock(¶hotplug_request_list_lock); - list_add_tail(&(req->list), ¶hotplug_request_list); + list_add_tail(&req->list, ¶hotplug_request_list); spin_unlock(¶hotplug_request_list_lock); parahotplug_request_kickoff(req); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/71] staging: unisys: Controlvm_channel camel case
From: Jeffrey Changed the camel case for Controlvm_channel to controlvm_channel on line 105 Controlvm_channel => controlvm_channel Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 78 +++--- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 789904a..882834e 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -102,7 +102,7 @@ static struct controlvm_message_packet g_devicechangestatepacket; static LIST_HEAD(businfolist); static LIST_HEAD(devinfolist); -static VISORCHANNEL *ControlVm_channel; +static VISORCHANNEL *controlvm_channel; typedef struct { u8 __iomem *ptr;/* pointer to base address of payload pool */ @@ -366,7 +366,7 @@ static ssize_t toolaction_show(struct device *dev, { u8 toolAction; - visorchannel_read(ControlVm_channel, + visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, tool_action), &toolAction, sizeof(u8)); return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction); @@ -382,7 +382,7 @@ static ssize_t toolaction_store(struct device *dev, if (kstrtou8(buf, 10, &toolAction) != 0) return -EINVAL; - ret = visorchannel_write(ControlVm_channel, + ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, tool_action), &toolAction, sizeof(u8)); @@ -398,7 +398,7 @@ static ssize_t boottotool_show(struct device *dev, { struct efi_spar_indication efiSparIndication; - visorchannel_read(ControlVm_channel, + visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, efi_spar_ind), &efiSparIndication, sizeof(struct efi_spar_indication)); @@ -417,7 +417,7 @@ static ssize_t boottotool_store(struct device *dev, return -EINVAL; efiSparIndication.boot_to_tool = val; - ret = visorchannel_write(ControlVm_channel, + ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, efi_spar_ind), &(efiSparIndication), sizeof(struct efi_spar_indication)); @@ -432,7 +432,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr, { u32 error; - visorchannel_read(ControlVm_channel, + visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, installation_error), &error, sizeof(u32)); return scnprintf(buf, PAGE_SIZE, "%i\n", error); @@ -447,7 +447,7 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr, if (kstrtou32(buf, 10, &error) != 0) return -EINVAL; - ret = visorchannel_write(ControlVm_channel, + ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, installation_error), &error, sizeof(u32)); @@ -461,7 +461,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr, { u32 textId; - visorchannel_read(ControlVm_channel, offsetof( + visorchannel_read(controlvm_channel, offsetof( struct spar_controlvm_channel_protocol, installation_text_id), &textId, sizeof(u32)); return scnprintf(buf, PAGE_SIZE, "%i\n", textId); @@ -476,7 +476,7 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr, if (kstrtou32(buf, 10, &textId) != 0) return -EINVAL; - ret = visorchannel_write(ControlVm_channel, + ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, installation_text_id), &textId, sizeof(u32)); @@ -490,7 +490,7 @@ static ssize_t remaining_steps_show(struct device *dev, { u16 remainingSteps; - visorchannel_read(ControlVm_channel, + visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, installation_remaining_steps),
[PATCH 51/71] staging: unisys: bus_epilog camel cases
From: Jeffrey Fixed all camel cases in the static void bus_epilog busNo -> busno msgHdr -> msghdr needResponse -> needresponse pBusInfo -> pbusinfo Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 32 +++--- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index f54d6c6..26cfb59 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -940,23 +940,23 @@ device_responder(enum controlvm_id cmdid, ulong busno, ulong devno, } static void -bus_epilog(u32 busNo, - u32 cmd, struct controlvm_message_header *msgHdr, - int response, BOOL needResponse) +bus_epilog(u32 busno, + u32 cmd, struct controlvm_message_header *msghdr, + int response, BOOL needresponse) { BOOL notified = FALSE; - struct visorchipset_bus_info *pBusInfo = findbus(&businfolist, busNo); + struct visorchipset_bus_info *pbusinfo = findbus(&businfolist, busno); - if (!pBusInfo) { - LOGERR("HUH? bad busNo=%d", busNo); + if (!pbusinfo) { + LOGERR("HUH? bad busNo=%d", busno); return; } - if (needResponse) { - memcpy(&pBusInfo->pending_msg_hdr, msgHdr, + if (needresponse) { + memcpy(&pbusinfo->pending_msg_hdr, msghdr, sizeof(struct controlvm_message_header)); } else { - pBusInfo->pending_msg_hdr.id = CONTROLVM_INVALID; + pbusinfo->pending_msg_hdr.id = CONTROLVM_INVALID; } down(¬ifierlock); if (response == CONTROLVM_RESP_SUCCESS) { @@ -973,23 +973,23 @@ bus_epilog(u32 busNo, * - BusDev_Client can handle ONLY client * devices */ if (busdev_server_notifiers.bus_create) { - (*busdev_server_notifiers.bus_create) (busNo); + (*busdev_server_notifiers.bus_create) (busno); notified = TRUE; } - if ((!pBusInfo->flags.server) /*client */ && + if ((!pbusinfo->flags.server) /*client */ && busdev_client_notifiers.bus_create) { - (*busdev_client_notifiers.bus_create) (busNo); + (*busdev_client_notifiers.bus_create) (busno); notified = TRUE; } break; case CONTROLVM_BUS_DESTROY: if (busdev_server_notifiers.bus_destroy) { - (*busdev_server_notifiers.bus_destroy) (busNo); + (*busdev_server_notifiers.bus_destroy) (busno); notified = TRUE; } - if ((!pBusInfo->flags.server) /*client */ && + if ((!pbusinfo->flags.server) /*client */ && busdev_client_notifiers.bus_destroy) { - (*busdev_client_notifiers.bus_destroy) (busNo); + (*busdev_client_notifiers.bus_destroy) (busno); notified = TRUE; } break; @@ -1002,7 +1002,7 @@ bus_epilog(u32 busNo, */ ; else - bus_responder(cmd, busNo, response); + bus_responder(cmd, busno, response); up(¬ifierlock); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 64/71] staging: unisys: setup_crash_devices_work_queue camel cases
From: Jeffrey Fixed the camel cases in the static void setup_crash_devices_work_ queue localCrashCreateBusMsg -> localcrashcreatebusmsg localCrashCreateDevMsg -> localcrashcreatedevmsg localSavedCrashMsgOffset -> localsavedcrashmsgoffset localSavedCrashMsgCount -> localsavedcrashmsgcount Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 7e3cd3f..1d9aaca 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -2056,21 +2056,21 @@ cleanups: static void setup_crash_devices_work_queue(struct work_struct *work) { - struct controlvm_message localCrashCreateBusMsg; - struct controlvm_message localCrashCreateDevMsg; + struct controlvm_message localcrashcreatebusmsg; + struct controlvm_message localcrashcreatedevmsg; struct controlvm_message msg; - u32 localSavedCrashMsgOffset; - u16 localSavedCrashMsgCount; + u32 localsavedcrashmsgoffset; + u16 localsavedcrashmsgcount; /* make sure visorbus server is registered for controlvm callbacks */ if (visorchipset_serverregwait && !serverregistered) - goto Away; + goto cleanups; /* make sure visorclientbus server is regsitered for controlvm * callbacks */ if (visorchipset_clientregwait && !clientregistered) - goto Away; + goto cleanups; POSTCODE_LINUX_2(CRASH_DEV_ENTRY_PC, POSTCODE_SEVERITY_INFO); @@ -2085,18 +2085,18 @@ setup_crash_devices_work_queue(struct work_struct *work) if (visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, saved_crash_message_count), - &localSavedCrashMsgCount, sizeof(u16)) < 0) { + &localsavedcrashmsgcount, sizeof(u16)) < 0) { LOGERR("failed to get Saved Message Count"); POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_SEVERITY_ERR); return; } - if (localSavedCrashMsgCount != CONTROLVM_CRASHMSG_MAX) { + if (localsavedcrashmsgcount != CONTROLVM_CRASHMSG_MAX) { LOGERR("Saved Message Count incorrect %d", - localSavedCrashMsgCount); + localsavedcrashmsgcount); POSTCODE_LINUX_3(CRASH_DEV_COUNT_FAILURE_PC, -localSavedCrashMsgCount, +localsavedcrashmsgcount, POSTCODE_SEVERITY_ERR); return; } @@ -2105,7 +2105,7 @@ setup_crash_devices_work_queue(struct work_struct *work) if (visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, saved_crash_message_offset), - &localSavedCrashMsgOffset, sizeof(u32)) < 0) { + &localsavedcrashmsgoffset, sizeof(u32)) < 0) { LOGERR("failed to get Saved Message Offset"); POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_SEVERITY_ERR); @@ -2114,8 +2114,8 @@ setup_crash_devices_work_queue(struct work_struct *work) /* read create device message for storage bus offset */ if (visorchannel_read(controlvm_channel, - localSavedCrashMsgOffset, - &localCrashCreateBusMsg, + localsavedcrashmsgoffset, + &localcrashcreatebusmsg, sizeof(struct controlvm_message)) < 0) { LOGERR("CRASH_DEV_RD_BUS_FAIULRE: Failed to read CrashCreateBusMsg!"); POSTCODE_LINUX_2(CRASH_DEV_RD_BUS_FAIULRE_PC, @@ -2125,9 +2125,9 @@ setup_crash_devices_work_queue(struct work_struct *work) /* read create device message for storage device */ if (visorchannel_read(controlvm_channel, - localSavedCrashMsgOffset + + localsavedcrashmsgoffset + sizeof(struct controlvm_message), - &localCrashCreateDevMsg, + &localcrashcreatedevmsg, sizeof(struct controlvm_message)) < 0) { LOGERR("CRASH_DEV_RD_DEV_FAIULRE: Failed to read CrashCreateDevMsg!");
[PATCH 57/71] staging: unisys: my_device_changestate camel case
From: Jeffrey Changed the camel cases in the static void my_device_changestate busNo -> busno devNo -> devno pDevInfo -> pdevinfo Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 2aa98f7..9b1d56b 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1320,35 +1320,35 @@ static void my_device_changestate(struct controlvm_message *inmsg) { struct controlvm_message_packet *cmd = &inmsg->cmd; - ulong busNo = cmd->device_change_state.bus_no; - ulong devNo = cmd->device_change_state.dev_no; + ulong busno = cmd->device_change_state.bus_no; + ulong devno = cmd->device_change_state.dev_no; struct spar_segment_state state = cmd->device_change_state.state; - struct visorchipset_device_info *pDevInfo = NULL; + struct visorchipset_device_info *pdevinfo = NULL; int rc = CONTROLVM_RESP_SUCCESS; - pDevInfo = finddevice(&devinfolist, busNo, devNo); - if (!pDevInfo) { + pdevinfo = finddevice(&devinfolist, busno, devno); + if (!pdevinfo) { LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (doesn't exist)", - busNo, devNo); - POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo, + busno, devno); + POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devno, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID; - goto Away; + goto cleanups; } - if (pDevInfo->state.created == 0) { + if (pdevinfo->state.created == 0) { LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (not created)", - busNo, devNo); - POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo, + busno, devno); + POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devno, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID; } -Away: - if ((rc >= CONTROLVM_RESP_SUCCESS) && pDevInfo) - device_epilog(busNo, devNo, state, CONTROLVM_DEVICE_CHANGESTATE, +cleanups: + if ((rc >= CONTROLVM_RESP_SUCCESS) && pdevinfo) + device_epilog(busno, devno, state, CONTROLVM_DEVICE_CHANGESTATE, &inmsg->hdr, rc, inmsg->hdr.flags.response_expected == 1, FOR_VISORBUS( - pDevInfo->chan_info.channel_type_uuid)); + pdevinfo->chan_info.channel_type_uuid)); } static void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 63/71] staging: unisys: controlvm_periodic_work camel cases
From: Jeffrey Fixed the camel cases for the static void controlvm_periodic_work gotAcommand -> gotacommand chanInfo -> chaninfo Poll_Count -> poll_count Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index e8ff836..7e3cd3f 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1946,28 +1946,28 @@ static HOSTADDRESS controlvm_get_channel_address(void) static void controlvm_periodic_work(struct work_struct *work) { - struct visorchipset_channel_info chanInfo; + struct visorchipset_channel_info chaninfo; struct controlvm_message inmsg; - BOOL gotACommand = FALSE; + BOOL gotacommand = FALSE; BOOL handle_command_failed = FALSE; - static u64 Poll_Count; + static u64 poll_count; /* make sure visorbus server is registered for controlvm callbacks */ if (visorchipset_serverregwait && !serverregistered) - goto Away; + goto cleanups; /* make sure visorclientbus server is regsitered for controlvm * callbacks */ if (visorchipset_clientregwait && !clientregistered) - goto Away; + goto cleanups; - memset(&chanInfo, 0, sizeof(struct visorchipset_channel_info)); + memset(&chaninfo, 0, sizeof(struct visorchipset_channel_info)); - Poll_Count++; - if (Poll_Count >= 250) + poll_count++; + if (poll_count >= 250) ; /* keep going */ else - goto Away; + goto cleanups; /* Check events to determine if response to CHIPSET_READY * should be sent @@ -1993,7 +1993,7 @@ controlvm_periodic_work(struct work_struct *work) inmsg.hdr.id); } } - if (!gotACommand) { + if (!gotacommand) { if (controlvm_pending_msg_valid) { /* we throttled processing of a prior * msg, so try to process it again @@ -2001,19 +2001,19 @@ controlvm_periodic_work(struct work_struct *work) */ inmsg = controlvm_pending_msg; controlvm_pending_msg_valid = FALSE; - gotACommand = TRUE; + gotacommand = TRUE; } else { - gotACommand = read_controlvm_event(&inmsg); + gotacommand = read_controlvm_event(&inmsg); } } handle_command_failed = FALSE; - while (gotACommand && (!handle_command_failed)) { + while (gotacommand && (!handle_command_failed)) { most_recent_message_jiffies = jiffies; if (handle_command(inmsg, visorchannel_get_physaddr (controlvm_channel))) - gotACommand = read_controlvm_event(&inmsg); + gotacommand = read_controlvm_event(&inmsg); else { /* this is a scenario where throttling * is required, but probably NOT an @@ -2030,7 +2030,7 @@ controlvm_periodic_work(struct work_struct *work) /* parahotplug_worker */ parahotplug_process_list(); -Away: +cleanups: if (time_after(jiffies, most_recent_message_jiffies + (HZ * MIN_IDLE_SECONDS))) { -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 58/71] staging: unisys: my_device_destroy camel cases
From: Jeffrey Fixed the camel cases in the static void my_device_destroy busNo -> busno devNo -> devno pDevInfo -> pdevinfo Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 26 +++--- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 9b1d56b..7aac90e 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1355,31 +1355,31 @@ static void my_device_destroy(struct controlvm_message *inmsg) { struct controlvm_message_packet *cmd = &inmsg->cmd; - ulong busNo = cmd->destroy_device.bus_no; - ulong devNo = cmd->destroy_device.dev_no; - struct visorchipset_device_info *pDevInfo = NULL; + ulong busno = cmd->destroy_device.bus_no; + ulong devno = cmd->destroy_device.dev_no; + struct visorchipset_device_info *pdevinfo = NULL; int rc = CONTROLVM_RESP_SUCCESS; - pDevInfo = finddevice(&devinfolist, busNo, devNo); - if (!pDevInfo) { + pdevinfo = finddevice(&devinfolist, busno, devno); + if (!pdevinfo) { LOGERR("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu invalid", - busNo, devNo); + busno, devno); rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID; - goto Away; + goto cleanups; } - if (pDevInfo->state.created == 0) { + if (pdevinfo->state.created == 0) { LOGERR("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu already destroyed", - busNo, devNo); + busno, devno); rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; } -Away: - if ((rc >= CONTROLVM_RESP_SUCCESS) && pDevInfo) - device_epilog(busNo, devNo, segment_state_running, +cleanups: + if ((rc >= CONTROLVM_RESP_SUCCESS) && pdevinfo) + device_epilog(busno, devno, segment_state_running, CONTROLVM_DEVICE_DESTROY, &inmsg->hdr, rc, inmsg->hdr.flags.response_expected == 1, FOR_VISORBUS( - pDevInfo->chan_info.channel_type_uuid)); + pdevinfo->chan_info.channel_type_uuid)); } /* When provided with the physical address of the controlvm channel -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 28/71] staging: unisys: bus_create_response camel cases
From: Jeffrey Changed the camel cases for the static void bus_create_response busNo => busno Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 7bb2171..fa74543 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -233,7 +233,7 @@ static void parahotplug_process_list(void); static struct visorchipset_busdev_notifiers busdev_server_notifiers; static struct visorchipset_busdev_notifiers busdev_client_notifiers; -static void bus_create_response(ulong busNo, int response); +static void bus_create_response(ulong busno, int response); static void bus_destroy_response(ulong busNo, int response); static void device_create_response(ulong busNo, ulong devNo, int response); static void device_destroy_response(ulong busNo, ulong devNo, int response); @@ -2167,9 +2167,9 @@ Away: } static void -bus_create_response(ulong busNo, int response) +bus_create_response(ulong busno, int response) { - bus_responder(CONTROLVM_BUS_CREATE, busNo, response); + bus_responder(CONTROLVM_BUS_CREATE, busno, response); } static void -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 61/71] staging: unisys: chipset camel cases
From: Jeffrey Fixed the camel cases for the static voids: chipset_ready, chipset_ selftest, & chipset_notready msgHdr -> msghdr Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index c09b554..ca57e03 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1508,43 +1508,43 @@ visorchipset_chipset_notready(void) EXPORT_SYMBOL_GPL(visorchipset_chipset_notready); static void -chipset_ready(struct controlvm_message_header *msgHdr) +chipset_ready(struct controlvm_message_header *msghdr) { int rc = visorchipset_chipset_ready(); if (rc != CONTROLVM_RESP_SUCCESS) rc = -rc; - if (msgHdr->flags.response_expected && !visorchipset_holdchipsetready) - controlvm_respond(msgHdr, rc); - if (msgHdr->flags.response_expected && visorchipset_holdchipsetready) { + if (msghdr->flags.response_expected && !visorchipset_holdchipsetready) + controlvm_respond(msghdr, rc); + if (msghdr->flags.response_expected && visorchipset_holdchipsetready) { /* Send CHIPSET_READY response when all modules have been loaded * and disks mounted for the partition */ - g_chipsetmsghdr = *msgHdr; + g_chipsetmsghdr = *msghdr; LOGINF("Holding CHIPSET_READY response"); } } static void -chipset_selftest(struct controlvm_message_header *msgHdr) +chipset_selftest(struct controlvm_message_header *msghdr) { int rc = visorchipset_chipset_selftest(); if (rc != CONTROLVM_RESP_SUCCESS) rc = -rc; - if (msgHdr->flags.response_expected) - controlvm_respond(msgHdr, rc); + if (msghdr->flags.response_expected) + controlvm_respond(msghdr, rc); } static void -chipset_notready(struct controlvm_message_header *msgHdr) +chipset_notready(struct controlvm_message_header *msghdr) { int rc = visorchipset_chipset_notready(); if (rc != CONTROLVM_RESP_SUCCESS) rc = -rc; - if (msgHdr->flags.response_expected) - controlvm_respond(msgHdr, rc); + if (msghdr->flags.response_expected) + controlvm_respond(msghdr, rc); } /* This is your "one-stop" shop for grabbing the next message from the -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 71/71] staging: unisys: static const chars visorchipset_main.c
From: Jeffrey Switched chars* arrays to static const char * const in visorchipset _main.c 1020: char *envp[] => static const char * const envp[] 1490: char env_selftest => static const char env_selftext 1491: char envp[] => static const char * const envp[] 1645: char env_cmd => static const char 1647: char envp => static const char * const envp Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 45b1760..314a3a2 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1017,7 +1017,7 @@ device_epilog(u32 busno, u32 devno, struct spar_segment_state state, u32 cmd, struct visorchipset_device_info *pdevinfo = finddevice(&devinfolist, busno, devno); - char *envp[] = { + static const char * const envp[] = { "SPARSP_DIAGPOOL_PAUSED_STATE = 1", NULL }; @@ -1487,8 +1487,8 @@ EXPORT_SYMBOL_GPL(visorchipset_chipset_ready); int visorchipset_chipset_selftest(void) { - char env_selftest[20]; - char *envp[] = { env_selftest, NULL }; + static const char env_selftest[20]; + static const char * const envp[] = { env_selftest, NULL }; sprintf(env_selftest, "SPARSP_SELFTEST=%d", 1); kobject_uevent_env(&visorchipset_platform_device.dev.kobj, KOBJ_CHANGE, @@ -1642,9 +1642,9 @@ static void parahotplug_request_kickoff(struct parahotplug_request *req) { struct controlvm_message_packet *cmd = &req->msg.cmd; - char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40], - env_func[40]; - char *envp[] = { + static const char env_cmd[40], env_id[40], env_state[40], env_bus[40], + env_dev[40], env_func[40]; + static const char * const envp[] = { env_cmd, env_id, env_state, env_bus, env_dev, env_func, NULL }; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 54/71] staging: unisys: bus_destroy camel cases
From: Jeffrey Changed the camel cases in the static void bus_destroy busNo -> busno pBusInfo -> pbusinfo Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 2c2a018..42eeaf9 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1163,25 +1163,25 @@ static void bus_destroy(struct controlvm_message *inmsg) { struct controlvm_message_packet *cmd = &inmsg->cmd; - ulong busNo = cmd->destroy_bus.bus_no; - struct visorchipset_bus_info *pBusInfo; + ulong busno = cmd->destroy_bus.bus_no; + struct visorchipset_bus_info *pbusinfo; int rc = CONTROLVM_RESP_SUCCESS; - pBusInfo = findbus(&businfolist, busNo); - if (!pBusInfo) { - LOGERR("CONTROLVM_BUS_DESTROY Failed: bus %lu invalid", busNo); + pbusinfo = findbus(&businfolist, busno); + if (!pbusinfo) { + LOGERR("CONTROLVM_BUS_DESTROY Failed: bus %lu invalid", busno); rc = -CONTROLVM_RESP_ERROR_BUS_INVALID; - goto Away; + goto cleanups; } - if (pBusInfo->state.created == 0) { + if (pbusinfo->state.created == 0) { LOGERR("CONTROLVM_BUS_DESTROY Failed: bus %lu already destroyed", - busNo); + busno); rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; - goto Away; + goto cleanups; } -Away: - bus_epilog(busNo, CONTROLVM_BUS_DESTROY, &inmsg->hdr, +cleanups: + bus_epilog(busno, CONTROLVM_BUS_DESTROY, &inmsg->hdr, rc, inmsg->hdr.flags.response_expected == 1); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 48/71] staging: unisys: bus_responder camel case
From: Jeffrey Changed the camel cases in the static void bus_responder cmdId -> cmdid busNo -> busno Signed-off-by: Jeffrey Brown --- .../staging/unisys/visorchipset/visorchipset_main.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index c96473d..69ff88a 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -831,25 +831,25 @@ visorchipset_save_message(struct controlvm_message *msg, EXPORT_SYMBOL_GPL(visorchipset_save_message); static void -bus_responder(enum controlvm_id cmdId, ulong busNo, int response) +bus_responder(enum controlvm_id cmdid, ulong busno, int response) { struct visorchipset_bus_info *p = NULL; BOOL need_clear = FALSE; - p = findbus(&businfolist, busNo); + p = findbus(&businfolist, busno); if (!p) { - LOGERR("internal error busNo=%lu", busNo); + LOGERR("internal error busNo=%lu", busno); return; } if (response < 0) { - if ((cmdId == CONTROLVM_BUS_CREATE) && + if ((cmdid == CONTROLVM_BUS_CREATE) && (response != (-CONTROLVM_RESP_ERROR_ALREADY_DONE))) /* undo the row we just created... */ - delbusdevices(&devinfolist, busNo); + delbusdevices(&devinfolist, busno); } else { - if (cmdId == CONTROLVM_BUS_CREATE) + if (cmdid == CONTROLVM_BUS_CREATE) p->state.created = 1; - if (cmdId == CONTROLVM_BUS_DESTROY) + if (cmdid == CONTROLVM_BUS_DESTROY) need_clear = TRUE; } @@ -857,15 +857,15 @@ bus_responder(enum controlvm_id cmdId, ulong busNo, int response) LOGERR("bus_responder no pending msg"); return; /* no controlvm response needed */ } - if (p->pending_msg_hdr.id != (u32)cmdId) { - LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id); + if (p->pending_msg_hdr.id != (u32)cmdid) { + LOGERR("expected=%d, found=%d", cmdid, p->pending_msg_hdr.id); return; } controlvm_respond(&p->pending_msg_hdr, response); p->pending_msg_hdr.id = CONTROLVM_INVALID; if (need_clear) { businfo_clear(p); - delbusdevices(&devinfolist, busNo); + delbusdevices(&devinfolist, busno); } } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 59/71] staging: unisys: initialize_controlvm_payload_info camel case
From: Jeffrey Fixed the camel cases in the static int initialize_controlvm_ payload_info Away -> cleanups Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 7aac90e..78cb05c 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1399,21 +1399,21 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes, LOGERR("HUH ? CONTROLVM_PAYLOAD_INIT Failed : Programmer check at %s:%d", __FILE__, __LINE__); rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID; - goto Away; + goto cleanups; } memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO)); if ((offset == 0) || (bytes == 0)) { LOGERR("CONTROLVM_PAYLOAD_INIT Failed: request_payload_offset=%llu request_payload_bytes=%llu!", (u64)offset, (u64)bytes); rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID; - goto Away; + goto cleanups; } payload = ioremap_cache(phys_addr + offset, bytes); if (payload == NULL) { LOGERR("CONTROLVM_PAYLOAD_INIT Failed: ioremap_cache %llu for %llu bytes failed", (u64)offset, (u64)bytes); rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED; - goto Away; + goto cleanups; } info->offset = offset; @@ -1422,7 +1422,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes, LOGINF("offset=%llu, bytes=%lu, ptr=%p", (u64)(info->offset), (ulong)(info->bytes), info->ptr); -Away: +cleanups: if (rc < 0) { if (payload != NULL) { iounmap(payload); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 68/71] staging: unisys: MESSAGE_ENVELOPE typedef
From: Jeffrey Changed the typedef struct MESSAGE ENVELOPE on line 74 to a normal struct. Also replaced all instances of MESSAGE_ENVELOPE with "MESSAGE_ENVELOPE" Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index d8e74c6..6977c8d 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -71,10 +71,10 @@ static struct delayed_work periodic_controlvm_work; static struct workqueue_struct *periodic_controlvm_workqueue; static DEFINE_SEMAPHORE(notifierlock); -typedef struct { +struct MESSAGE_ENVELOPE { struct controlvm_message message; unsigned int crc; -} MESSAGE_ENVELOPE; +}; static struct controlvm_message_header g_diagmsghdr; static struct controlvm_message_header g_chipsetmsghdr; -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 40/71] staging: unisys: efisparindication camel cases
From: Jeffrey Changed the camel caes of EfiSparIndication to efisparindication in the static ssize_ts of boottotool_store and boottotool_show EfiSparIndication => efisparindication Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index d21752f..80a81cc 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -396,14 +396,14 @@ static ssize_t boottotool_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct efi_spar_indication efiSparIndication; + struct efi_spar_indication efisparindication; visorchannel_read(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, - efi_spar_ind), &efiSparIndication, + efi_spar_ind), &efisparindication, sizeof(struct efi_spar_indication)); return scnprintf(buf, PAGE_SIZE, "%u\n", - efiSparIndication.boot_to_tool); + efisparindication.boot_to_tool); } static ssize_t boottotool_store(struct device *dev, @@ -411,15 +411,15 @@ static ssize_t boottotool_store(struct device *dev, const char *buf, size_t count) { int val, ret; - struct efi_spar_indication efiSparIndication; + struct efi_spar_indication efisparindication; if (kstrtoint(buf, 10, &val) != 0) return -EINVAL; - efiSparIndication.boot_to_tool = val; + efisparindication.boot_to_tool = val; ret = visorchannel_write(controlvm_channel, offsetof(struct spar_controlvm_channel_protocol, - efi_spar_ind), &(efiSparIndication), + efi_spar_ind), &(efisparindication), sizeof(struct efi_spar_indication)); if (ret) -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 53/71] staging: unisys: bus_create camel cases
From: Jeffrey Changed the camel cases in the static_void bus_create busNo -> busno pBusInfo -> pbusinfo Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 217d628..2c2a018 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1109,53 +1109,53 @@ static void bus_create(struct controlvm_message *inmsg) { struct controlvm_message_packet *cmd = &inmsg->cmd; - ulong busNo = cmd->create_bus.bus_no; + ulong busno = cmd->create_bus.bus_no; int rc = CONTROLVM_RESP_SUCCESS; - struct visorchipset_bus_info *pBusInfo = NULL; + struct visorchipset_bus_info *pbusinfo = NULL; - pBusInfo = findbus(&businfolist, busNo); - if (pBusInfo && (pBusInfo->state.created == 1)) { + pbusinfo = findbus(&businfolist, busno); + if (pbusinfo && (pbusinfo->state.created == 1)) { LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu already exists", - busNo); - POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo, + busno); + POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; - goto Away; + goto cleanups; } - pBusInfo = kzalloc(sizeof(*pBusInfo), GFP_KERNEL); - if (pBusInfo == NULL) { + pbusinfo = kzalloc(sizeof(*pbusinfo), GFP_KERNEL); + if (pbusinfo == NULL) { LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu kzalloc failed", - busNo); - POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo, + busno); + POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED; - goto Away; + goto cleanups; } - INIT_LIST_HEAD(&pBusInfo->entry); - pBusInfo->bus_no = busNo; - pBusInfo->dev_no = cmd->create_bus.dev_count; + INIT_LIST_HEAD(&pbusinfo->entry); + pbusinfo->bus_no = busno; + pbusinfo->dev_no = cmd->create_bus.dev_count; - POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO); + POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, busno, POSTCODE_SEVERITY_INFO); if (inmsg->hdr.flags.test_message == 1) - pBusInfo->chan_info.addr_type = ADDRTYPE_LOCALTEST; + pbusinfo->chan_info.addr_type = ADDRTYPE_LOCALTEST; else - pBusInfo->chan_info.addr_type = ADDRTYPE_LOCALPHYSICAL; + pbusinfo->chan_info.addr_type = ADDRTYPE_LOCALPHYSICAL; - pBusInfo->flags.server = inmsg->hdr.flags.server; - pBusInfo->chan_info.channel_addr = cmd->create_bus.channel_addr; - pBusInfo->chan_info.n_channel_bytes = cmd->create_bus.channel_bytes; - pBusInfo->chan_info.channel_type_uuid = + pbusinfo->flags.server = inmsg->hdr.flags.server; + pbusinfo->chan_info.channel_addr = cmd->create_bus.channel_addr; + pbusinfo->chan_info.n_channel_bytes = cmd->create_bus.channel_bytes; + pbusinfo->chan_info.channel_type_uuid = cmd->create_bus.bus_data_type_uuid; - pBusInfo->chan_info.channel_inst_uuid = cmd->create_bus.bus_inst_uuid; + pbusinfo->chan_info.channel_inst_uuid = cmd->create_bus.bus_inst_uuid; - list_add(&pBusInfo->entry, &businfolist); + list_add(&pbusinfo->entry, &businfolist); - POSTCODE_LINUX_3(BUS_CREATE_EXIT_PC, busNo, POSTCODE_SEVERITY_INFO); + POSTCODE_LINUX_3(BUS_CREATE_EXIT_PC, busno, POSTCODE_SEVERITY_INFO); -Away: - bus_epilog(busNo, CONTROLVM_BUS_CREATE, &inmsg->hdr, +cleanups: + bus_epilog(busno, CONTROLVM_BUS_CREATE, &inmsg->hdr, rc, inmsg->hdr.flags.response_expected == 1); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 55/71] staging: unisys: bus_configure camel case
From: Jeffrey Chagned the camel cases in this static void busNo -> busno pBusInfo -> pbusinfo Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 48 +++--- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 42eeaf9..54ee543 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1189,50 +1189,50 @@ static void bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx) { struct controlvm_message_packet *cmd = &inmsg->cmd; - ulong busNo = cmd->configure_bus.bus_no; - struct visorchipset_bus_info *pBusInfo = NULL; + ulong busno = cmd->configure_bus.bus_no; + struct visorchipset_bus_info *pbusinfo = NULL; int rc = CONTROLVM_RESP_SUCCESS; char s[99]; - busNo = cmd->configure_bus.bus_no; - POSTCODE_LINUX_3(BUS_CONFIGURE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO); + busno = cmd->configure_bus.bus_no; + POSTCODE_LINUX_3(BUS_CONFIGURE_ENTRY_PC, busno, POSTCODE_SEVERITY_INFO); - pBusInfo = findbus(&businfolist, busNo); - if (!pBusInfo) { + pbusinfo = findbus(&businfolist, busno); + if (!pbusinfo) { LOGERR("CONTROLVM_BUS_CONFIGURE Failed: bus %lu invalid", - busNo); - POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo, + busno); + POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_BUS_INVALID; - goto Away; + goto cleanups; } - if (pBusInfo->state.created == 0) { + if (pbusinfo->state.created == 0) { LOGERR("CONTROLVM_BUS_CONFIGURE Failed: Invalid bus %lu - not created yet", - busNo); - POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo, + busno); + POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_BUS_INVALID; - goto Away; + goto cleanups; } /* TBD - add this check to other commands also... */ - if (pBusInfo->pending_msg_hdr.id != CONTROLVM_INVALID) { + if (pbusinfo->pending_msg_hdr.id != CONTROLVM_INVALID) { LOGERR("CONTROLVM_BUS_CONFIGURE Failed: bus %lu MsgId=%u outstanding", - busNo, (uint) pBusInfo->pending_msg_hdr.id); - POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo, + busno, (uint) pbusinfo->pending_msg_hdr.id); + POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT; - goto Away; + goto cleanups; } - pBusInfo->partition_handle = cmd->configure_bus.guest_handle; - pBusInfo->partition_uuid = parser_id_get(parser_ctx); + pbusinfo->partition_handle = cmd->configure_bus.guest_handle; + pbusinfo->partition_uuid = parser_id_get(parser_ctx); parser_param_start(parser_ctx, PARSERSTRING_NAME); - pBusInfo->name = parser_string_get(parser_ctx); + pbusinfo->name = parser_string_get(parser_ctx); - visorchannel_uuid_id(&pBusInfo->partition_uuid, s); - POSTCODE_LINUX_3(BUS_CONFIGURE_EXIT_PC, busNo, POSTCODE_SEVERITY_INFO); -Away: - bus_epilog(busNo, CONTROLVM_BUS_CONFIGURE, &inmsg->hdr, + visorchannel_uuid_id(&pbusinfo->partition_uuid, s); + POSTCODE_LINUX_3(BUS_CONFIGURE_EXIT_PC, busno, POSTCODE_SEVERITY_INFO); +cleanups: + bus_epilog(busno, CONTROLVM_BUS_CONFIGURE, &inmsg->hdr, rc, inmsg->hdr.flags.response_expected == 1); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 66/71] staging: unisys: testUnicode camel case
From: Jeffrey Fixed the camel cases for the static void testUnicode testUnicode -> testunicode unicodeString -> unicodestring Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 3d2d435..174e90a 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -518,10 +518,10 @@ static ssize_t remaining_steps_store(struct device *dev, #if 0 static void -testUnicode(void) +testunicode(void) { - wchar_t unicodeString[] = { 'a', 'b', 'c', 0 }; - char s[sizeof(unicodeString) * NLS_MAX_CHARSET_SIZE]; + wchar_t unicodestring[] = { 'a', 'b', 'c', 0 }; + char s[sizeof(unicodestring) * NLS_MAX_CHARSET_SIZE]; wchar_t unicode2[99]; /* NOTE: Either due to a bug, or feature I don't understand, the @@ -531,14 +531,14 @@ testUnicode(void) LOGINF("sizeof(wchar_t) = %d", sizeof(wchar_t)); LOGINF("utf8_wcstombs=%d", - chrs = utf8_wcstombs(s, unicodeString, sizeof(s))); + chrs = utf8_wcstombs(s, unicodestring, sizeof(s))); if (chrs >= 0) s[chrs] = '\0'; /* G */ LOGINF("s='%s'", s); LOGINF("utf8_mbstowcs=%d", chrs = utf8_mbstowcs(unicode2, s, 100)); if (chrs >= 0) unicode2[chrs] = 0; /* G */ - if (memcmp(unicodeString, unicode2, sizeof(unicodeString)) == 0) + if (memcmp(unicodestring, unicode2, sizeof(unicodestring)) == 0) LOGINF("strings match... good"); else LOGINF("strings did not match!!"); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 56/71] staging: unisys: my_device_create camel cases
From: Jeffrey Removed the camel cases in the static void of my_device_create busNo -> busno devNo -> devno pDevInfo -> pdevinfo pBusInfo -> pbusinfo Away -> cleanups Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 86 +++--- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 54ee543..2aa98f7 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1240,80 +1240,80 @@ static void my_device_create(struct controlvm_message *inmsg) { struct controlvm_message_packet *cmd = &inmsg->cmd; - ulong busNo = cmd->create_device.bus_no; - ulong devNo = cmd->create_device.dev_no; - struct visorchipset_device_info *pDevInfo = NULL; - struct visorchipset_bus_info *pBusInfo = NULL; + ulong busno = cmd->create_device.bus_no; + ulong devno = cmd->create_device.dev_no; + struct visorchipset_device_info *pdevinfo = NULL; + struct visorchipset_bus_info *pbusinfo = NULL; int rc = CONTROLVM_RESP_SUCCESS; - pDevInfo = finddevice(&devinfolist, busNo, devNo); - if (pDevInfo && (pDevInfo->state.created == 1)) { + pdevinfo = finddevice(&devinfolist, busno, devno); + if (pdevinfo && (pdevinfo->state.created == 1)) { LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu already exists", - busNo, devNo); - POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo, + busno, devno); + POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devno, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE; - goto Away; + goto cleanups; } - pBusInfo = findbus(&businfolist, busNo); - if (!pBusInfo) { + pbusinfo = findbus(&businfolist, busno); + if (!pbusinfo) { LOGERR("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - out of range", - busNo); - POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo, + busno); + POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devno, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_BUS_INVALID; - goto Away; + goto cleanups; } - if (pBusInfo->state.created == 0) { + if (pbusinfo->state.created == 0) { LOGERR("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - not created yet", - busNo); - POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo, + busno); + POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devno, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_BUS_INVALID; - goto Away; + goto cleanups; } - pDevInfo = kzalloc(sizeof(*pDevInfo), GFP_KERNEL); - if (pDevInfo == NULL) { + pdevinfo = kzalloc(sizeof(*pdevinfo), GFP_KERNEL); + if (pdevinfo == NULL) { LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu kmaloc failed", - busNo, devNo); - POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo, + busno, devno); + POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devno, busno, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED; - goto Away; + goto cleanups; } - INIT_LIST_HEAD(&pDevInfo->entry); - pDevInfo->bus_no = busNo; - pDevInfo->dev_no = devNo; - pDevInfo->dev_inst_uuid = cmd->create_device.dev_inst_uuid; - POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo, + INIT_LIST_HEAD(&pdevinfo->entry); + pdevinfo->bus_no = busno; + pdevinfo->dev_no = devno; + pdevinfo->dev_inst_uuid = cmd->create_device.dev_inst_uuid; + POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devno, busno, POSTCODE_SEVERITY_INFO); if (inmsg->hdr.flags.test_message == 1) - pDevInfo->chan_info.addr_type = ADDRTYPE_LOCALTEST; + pdevinfo->chan_info.addr_type = ADDRTYPE_LOCALTEST; else - pDevInfo->chan_info.addr_type = ADDRTYPE_LOCALPHYSICAL; - pDevInfo->chan_info.channel_addr = cmd->create_device.channel_addr; - pDevInfo->chan_info.n_channel_bytes = cmd->create_device.c
[PATCH 62/71] staging: unisys: handle_command camel cases
From: Jeffrey Removed the camel cases from the static BOOL handle_command parametersAddr -> parametersaddr parameterBytes -> parametersbytes isLocalAddr -> islocaladdr Signed-off-by: Jeffrey Brown --- .../unisys/visorchipset/visorchipset_main.c| 26 +++--- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index ca57e03..e8ff836 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1795,31 +1795,31 @@ static BOOL handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) { struct controlvm_message_packet *cmd = &inmsg.cmd; - u64 parametersAddr = 0; - u32 parametersBytes = 0; + u64 parametersaddr = 0; + u32 parametersbytes = 0; PARSER_CONTEXT *parser_ctx = NULL; - BOOL isLocalAddr = FALSE; + BOOL islocaladdr = FALSE; struct controlvm_message ackmsg; /* create parsing context if necessary */ - isLocalAddr = (inmsg.hdr.flags.test_message == 1); + islocaladdr = (inmsg.hdr.flags.test_message == 1); if (channel_addr == 0) { LOGERR("HUH? channel_addr is 0!"); return TRUE; } - parametersAddr = channel_addr + inmsg.hdr.payload_vm_offset; - parametersBytes = inmsg.hdr.payload_bytes; + parametersaddr = channel_addr + inmsg.hdr.payload_vm_offset; + parametersbytes = inmsg.hdr.payload_bytes; /* Parameter and channel addresses within test messages actually lie * within our OS-controlled memory. We need to know that, because it * makes a difference in how we compute the virtual address. */ - if (parametersAddr != 0 && parametersBytes != 0) { + if (parametersaddr != 0 && parametersbytes != 0) { BOOL retry = FALSE; parser_ctx = - parser_init_byteStream(parametersAddr, parametersBytes, - isLocalAddr, &retry); + parser_init_byteStream(parametersaddr, parametersbytes, + islocaladdr, &retry); if (!parser_ctx) { if (retry) { LOGWRN("throttling to copy payload"); @@ -1827,13 +1827,13 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) } LOGWRN("parsing failed"); LOGWRN("inmsg.hdr.Id=0x%lx", (ulong)inmsg.hdr.id); - LOGWRN("parametersAddr=0x%llx", (u64)parametersAddr); - LOGWRN("parametersBytes=%lu", (ulong)parametersBytes); - LOGWRN("isLocalAddr=%d", isLocalAddr); + LOGWRN("parametersAddr=0x%llx", (u64)parametersaddr); + LOGWRN("parametersBytes=%lu", (ulong)parametersbytes); + LOGWRN("isLocalAddr=%d", islocaladdr); } } - if (!isLocalAddr) { + if (!islocaladdr) { controlvm_init_response(&ackmsg, &inmsg.hdr, CONTROLVM_RESP_SUCCESS); if ((controlvm_channel) && -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/71] staging: unisys: Parahotplug_request_list_lock camel case
From: Jeffrey Changed the camel case to parahotplug_request_list_lock Parahotplug_request_list_lock => parahotplug_request_list_lock Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 887e3be..1a04e5b 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -224,7 +224,7 @@ struct parahotplug_request { }; static LIST_HEAD(parahotplug_request_list); -static DEFINE_SPINLOCK(Parahotplug_request_list_lock); /* lock for above */ +static DEFINE_SPINLOCK(parahotplug_request_list_lock); /* lock for above */ static void parahotplug_process_list(void); /* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE / @@ -1678,7 +1678,7 @@ parahotplug_process_list(void) struct list_head *pos = NULL; struct list_head *tmp = NULL; - spin_lock(&Parahotplug_request_list_lock); + spin_lock(¶hotplug_request_list_lock); list_for_each_safe(pos, tmp, ¶hotplug_request_list) { struct parahotplug_request *req = @@ -1694,7 +1694,7 @@ parahotplug_process_list(void) } } - spin_unlock(&Parahotplug_request_list_lock); + spin_unlock(¶hotplug_request_list_lock); } /* @@ -1708,7 +1708,7 @@ parahotplug_request_complete(int id, u16 active) struct list_head *pos = NULL; struct list_head *tmp = NULL; - spin_lock(&Parahotplug_request_list_lock); + spin_lock(¶hotplug_request_list_lock); /* Look for a request matching "id". */ list_for_each_safe(pos, tmp, ¶hotplug_request_list) { @@ -1719,7 +1719,7 @@ parahotplug_request_complete(int id, u16 active) * respond. */ list_del(pos); - spin_unlock(&Parahotplug_request_list_lock); + spin_unlock(¶hotplug_request_list_lock); req->msg.cmd.device_change_state.state.active = active; if (req->msg.hdr.flags.response_expected) controlvm_respond_physdev_changestate( @@ -1730,7 +1730,7 @@ parahotplug_request_complete(int id, u16 active) } } - spin_unlock(&Parahotplug_request_list_lock); + spin_unlock(¶hotplug_request_list_lock); return -1; } @@ -1772,9 +1772,9 @@ parahotplug_process_message(struct controlvm_message *inmsg) * won't get responded to until the script has * indicated it's done. */ - spin_lock(&Parahotplug_request_list_lock); + spin_lock(¶hotplug_request_list_lock); list_add_tail(&(req->list), ¶hotplug_request_list); - spin_unlock(&Parahotplug_request_list_lock); + spin_unlock(¶hotplug_request_list_lock); parahotplug_request_kickoff(req); } -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 50/71] staging: unisys: device_responder camel cases
From: Jeffrey Changed the camel cases in the static void device_responder cmdId -> cmdid busNo -> busno devNo -> devno Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index fa708d3..f54d6c6 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -907,21 +907,21 @@ device_changestate_responder(enum controlvm_id cmdid, } static void -device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, +device_responder(enum controlvm_id cmdid, ulong busno, ulong devno, int response) { struct visorchipset_device_info *p = NULL; BOOL need_clear = FALSE; - p = finddevice(&devinfolist, busNo, devNo); + p = finddevice(&devinfolist, busno, devno); if (!p) { - LOGERR("internal error; busNo=%lu, devNo=%lu", busNo, devNo); + LOGERR("internal error; busNo=%lu, devNo=%lu", busno, devno); return; } if (response >= 0) { - if (cmdId == CONTROLVM_DEVICE_CREATE) + if (cmdid == CONTROLVM_DEVICE_CREATE) p->state.created = 1; - if (cmdId == CONTROLVM_DEVICE_DESTROY) + if (cmdid == CONTROLVM_DEVICE_DESTROY) need_clear = TRUE; } @@ -929,8 +929,8 @@ device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo, LOGERR("device_responder no pending msg"); return; /* no controlvm response needed */ } - if (p->pending_msg_hdr.id != (u32)cmdId) { - LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id); + if (p->pending_msg_hdr.id != (u32)cmdid) { + LOGERR("expected=%d, found=%d", cmdid, p->pending_msg_hdr.id); return; } controlvm_respond(&p->pending_msg_hdr, response); -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/11] staging: unisys: small bug parser.c
Fixed small bug in parser.c by removing "cleanups:" in parser_init _guts struct. Replaced it with proper error handling code and removed the instances of rc = NULL in the code. rc = NULL is redudant Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 46 ++--- 1 files changed, 11 insertions(+), 35 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 5f6a7b2..beb36a2 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -64,8 +64,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, MAX_CONTROLVM_PAYLOAD_BYTES); if (try_again) *try_again = TRUE; - rc = NULL; - goto cleanups; } ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); if (ctx == NULL) { @@ -73,8 +71,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, __func__, __FILE__, __LINE__, allocbytes); if (try_again) *try_again = TRUE; - rc = NULL; - goto cleanups; } ctx->allocbytes = allocbytes; @@ -89,42 +85,27 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, ERRDRV("%s - bad local address (0x%-16.16Lx for %lu)", __func__, (unsigned long long)addr, (ulong)bytes); - rc = NULL; - goto cleanups; } p = __va((ulong)(addr)); memcpy(ctx->data, p, bytes); } else { rgn = visor_memregion_create(addr, bytes); - if (!rgn) { - rc = NULL; - goto cleanups; - } - if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) { - rc = NULL; - goto cleanups; - } } if (!has_standard_payload_header) { ctx->byte_stream = TRUE; rc = ctx; - goto cleanups; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); if (phdr->total_length != bytes) { ERRDRV("%s - bad total length %lu (should be %lu)", __func__, (ulong)(phdr->total_length), (ulong)(bytes)); - rc = NULL; - goto cleanups; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", __func__, (ulong)(phdr->total_length), (ulong)(phdr->header_length)); - rc = NULL; - goto cleanups; } if (phdr->header_length < sizeof(struct spar_controlvm_parameters_header)) { @@ -133,25 +114,20 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, (ulong)(phdr->header_length), (ulong)(sizeof( struct spar_controlvm_parameters_header))); - rc = NULL; - goto cleanups; } - rc = ctx; -cleanups: - if (rgn) { +out_rgn: + if (rgn) visor_memregion_destroy(rgn); - rgn = NULL; - } - if (rc) { - controlvm_payload_bytes_buffered += ctx->param_bytes; - } else { - if (ctx) { - parser_done(ctx); - ctx = NULL; - } - } - return rc; + controlvm_payload_bytes_buffered += ctx->param_bytes; + + return ctx; +err_rgn: + if (rgn) + visor_memregion_destroy(rgn); +err_ctx: + kfree(ctx); + return NULL; } struct parser_context_tag * -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: unisys: small parser.c bug fix
Replaced "cleanups" in the struct parser_init_guts with err_rgn, err_ctx, and out_rgn. The purpose is to remove redundant code and have proper error handling Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 43 +++-- 1 files changed, 19 insertions(+), 24 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 5f6a7b2..2897125 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -64,8 +64,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, MAX_CONTROLVM_PAYLOAD_BYTES); if (try_again) *try_again = TRUE; - rc = NULL; - goto cleanups; } ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); if (ctx == NULL) { @@ -74,7 +72,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, if (try_again) *try_again = TRUE; rc = NULL; - goto cleanups; + return NULL; } ctx->allocbytes = allocbytes; @@ -90,7 +88,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, __func__, (unsigned long long)addr, (ulong)bytes); rc = NULL; - goto cleanups; } p = __va((ulong)(addr)); memcpy(ctx->data, p, bytes); @@ -98,17 +95,17 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, rgn = visor_memregion_create(addr, bytes); if (!rgn) { rc = NULL; - goto cleanups; + goto err_ctx; } if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) { rc = NULL; - goto cleanups; + goto err_ctx; } } if (!has_standard_payload_header) { ctx->byte_stream = TRUE; rc = ctx; - goto cleanups; + goto err_rgn; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); if (phdr->total_length != bytes) { @@ -116,7 +113,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, __func__, (ulong)(phdr->total_length), (ulong)(bytes)); rc = NULL; - goto cleanups; + goto out_rgn; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", @@ -124,7 +121,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, (ulong)(phdr->total_length), (ulong)(phdr->header_length)); rc = NULL; - goto cleanups; + goto err_rgn; } if (phdr->header_length < sizeof(struct spar_controlvm_parameters_header)) { @@ -134,24 +131,22 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, (ulong)(sizeof( struct spar_controlvm_parameters_header))); rc = NULL; - goto cleanups; + goto err_rgn; } - rc = ctx; -cleanups: - if (rgn) { +out_rgn: + if (rgn) visor_memregion_destroy(rgn); - rgn = NULL; - } - if (rc) { - controlvm_payload_bytes_buffered += ctx->param_bytes; - } else { - if (ctx) { - parser_done(ctx); - ctx = NULL; - } - } - return rc; + + return ctx; + +err_rgn: + if (rgn) + visor_memregion_destroy(rgn); + +err_ctx: + kfree(ctx); + return NULL; } struct parser_context_tag * -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: unisys: small parser.c bug fix
Replaced "cleanups" in the struct parser_init_guts with err_rgn, err_ctx, and out_rgn. The purpose is to remove redundant code and have proper error handling. Put "goto out_rgn" on lin 108 because there was no "out_ctx". Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 2897125..d31c856 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -71,7 +71,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, __func__, __FILE__, __LINE__, allocbytes); if (try_again) *try_again = TRUE; - rc = NULL; return NULL; } @@ -87,40 +86,41 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, ERRDRV("%s - bad local address (0x%-16.16Lx for %lu)", __func__, (unsigned long long)addr, (ulong)bytes); - rc = NULL; + return NULL; + goto err_ctx; } p = __va((ulong)(addr)); memcpy(ctx->data, p, bytes); } else { rgn = visor_memregion_create(addr, bytes); if (!rgn) { - rc = NULL; + return NULL; goto err_ctx; } if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) { - rc = NULL; + return NULL; goto err_ctx; } } if (!has_standard_payload_header) { ctx->byte_stream = TRUE; rc = ctx; - goto err_rgn; + goto out_rgn; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); if (phdr->total_length != bytes) { ERRDRV("%s - bad total length %lu (should be %lu)", __func__, (ulong)(phdr->total_length), (ulong)(bytes)); - rc = NULL; - goto out_rgn; + return NULL; + goto err_rgn; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", __func__, (ulong)(phdr->total_length), (ulong)(phdr->header_length)); - rc = NULL; + return NULL; goto err_rgn; } if (phdr->header_length < @@ -130,7 +130,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, (ulong)(phdr->header_length), (ulong)(sizeof( struct spar_controlvm_parameters_header))); - rc = NULL; + return NULL; goto err_rgn; } @@ -138,7 +138,8 @@ out_rgn: if (rgn) visor_memregion_destroy(rgn); - return ctx; + controlvm_payload_bytes_buffered += ctx->param_bytes; + return ctx; err_rgn: if (rgn) -- 1.8.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: unisys: parser.c bug
From: Jeff Replaced cleanups: with err_rgn, err_ctx, and out_rgn in the file. This is to have proper error and success handling. I also removed the variable rc because like cleanups, rc is redundant in this file Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 62 +++- 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 5f6a7b2..e4e230f 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -45,7 +45,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, BOOL has_standard_payload_header, BOOL *try_again) { 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; @@ -64,8 +63,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, MAX_CONTROLVM_PAYLOAD_BYTES); if (try_again) *try_again = TRUE; - rc = NULL; - goto cleanups; + return NULL; } ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); if (ctx == NULL) { @@ -73,8 +71,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, __func__, __FILE__, __LINE__, allocbytes); if (try_again) *try_again = TRUE; - rc = NULL; - goto cleanups; + return NULL; } ctx->allocbytes = allocbytes; @@ -89,42 +86,35 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, ERRDRV("%s - bad local address (0x%-16.16Lx for %lu)", __func__, (unsigned long long)addr, (ulong)bytes); - rc = NULL; - goto cleanups; + goto err_ctx; } p = __va((ulong)(addr)); memcpy(ctx->data, p, bytes); } else { rgn = visor_memregion_create(addr, bytes); - if (!rgn) { - rc = NULL; - goto cleanups; - } - if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) { - rc = NULL; - goto cleanups; - } + if (!rgn) + goto err_ctx; + + if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) + goto err_rgn; } if (!has_standard_payload_header) { ctx->byte_stream = TRUE; - rc = ctx; - goto cleanups; + goto out_rgn; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); if (phdr->total_length != bytes) { ERRDRV("%s - bad total length %lu (should be %lu)", __func__, (ulong)(phdr->total_length), (ulong)(bytes)); - rc = NULL; - goto cleanups; + goto err_rgn; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", __func__, (ulong)(phdr->total_length), (ulong)(phdr->header_length)); - rc = NULL; - goto cleanups; + goto err_rgn; } if (phdr->header_length < sizeof(struct spar_controlvm_parameters_header)) { @@ -133,25 +123,23 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, (ulong)(phdr->header_length), (ulong)(sizeof( struct spar_controlvm_parameters_header))); - rc = NULL; - goto cleanups; + goto err_rgn; } - rc = ctx; -cleanups: - if (rgn) { +out_rgn: + if (rgn) visor_memregion_destroy(rgn); - rgn = NULL; - } - if (rc) { - controlvm_payload_bytes_buffered += ctx->param_bytes; - } else { - if (ctx) { - parser_done(ctx); - ctx = NULL; - } - } - return rc; + controlvm_payload_bytes_buffered += ctx->param_bytes; + + return ctx; + +err_rgn: + if (rgn) + visor_memregion_destroy(rgn); +err_ctx: + kfree(ctx); + + return NULL; } struct parser_context_tag * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: unisys: parser.c bug
Replaced cleanups: with err_rgn, err_ctx, and out_rgn in the file. This is to have proper error and success handling. I also removed the variable rc because like cleanups, rc is redundant in this file Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 62 +++- 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 5f6a7b2..e4e230f 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -45,7 +45,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, BOOL has_standard_payload_header, BOOL *try_again) { 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; @@ -64,8 +63,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, MAX_CONTROLVM_PAYLOAD_BYTES); if (try_again) *try_again = TRUE; - rc = NULL; - goto cleanups; + return NULL; } ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); if (ctx == NULL) { @@ -73,8 +71,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, __func__, __FILE__, __LINE__, allocbytes); if (try_again) *try_again = TRUE; - rc = NULL; - goto cleanups; + return NULL; } ctx->allocbytes = allocbytes; @@ -89,42 +86,35 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, ERRDRV("%s - bad local address (0x%-16.16Lx for %lu)", __func__, (unsigned long long)addr, (ulong)bytes); - rc = NULL; - goto cleanups; + goto err_ctx; } p = __va((ulong)(addr)); memcpy(ctx->data, p, bytes); } else { rgn = visor_memregion_create(addr, bytes); - if (!rgn) { - rc = NULL; - goto cleanups; - } - if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) { - rc = NULL; - goto cleanups; - } + if (!rgn) + goto err_ctx; + + if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) + goto err_rgn; } if (!has_standard_payload_header) { ctx->byte_stream = TRUE; - rc = ctx; - goto cleanups; + goto out_rgn; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); if (phdr->total_length != bytes) { ERRDRV("%s - bad total length %lu (should be %lu)", __func__, (ulong)(phdr->total_length), (ulong)(bytes)); - rc = NULL; - goto cleanups; + goto err_rgn; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", __func__, (ulong)(phdr->total_length), (ulong)(phdr->header_length)); - rc = NULL; - goto cleanups; + goto err_rgn; } if (phdr->header_length < sizeof(struct spar_controlvm_parameters_header)) { @@ -133,25 +123,23 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, (ulong)(phdr->header_length), (ulong)(sizeof( struct spar_controlvm_parameters_header))); - rc = NULL; - goto cleanups; + goto err_rgn; } - rc = ctx; -cleanups: - if (rgn) { +out_rgn: + if (rgn) visor_memregion_destroy(rgn); - rgn = NULL; - } - if (rc) { - controlvm_payload_bytes_buffered += ctx->param_bytes; - } else { - if (ctx) { - parser_done(ctx); - ctx = NULL; - } - } - return rc; + controlvm_payload_bytes_buffered += ctx->param_bytes; + + return ctx; + +err_rgn: + if (rgn) + visor_memregion_destroy(rgn); +err_ctx: + kfree(ctx); + + return NULL; } struct parser_context_tag * -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/10] parser header and c file patches
This series of patches made corrections to the camel casing and typedef problems in parser header and parser.c. There is a camel case in parser header where visorchipset_main.c was affected as well. Smaller problems like space after casts, braces, and logical coninuations in parser.c were solved as well. Jeffrey Brown (10): staging: unisys: parser_init camel cases staging: unisys: parser_init_byteStream camel case staging: unisys: simpleString_get & byteStream_get camel case staging: unisys: PARSER_CONTEXT typedef staging: unisys: PARSER_WHICH_STRING typedef staging: unisys: Controlvm_Payload_Bytes_Buffered camel case staging: unisys: parser_init_guts and parser_param_start camel case staging: unisys: parser.c space after casts staging: unisys: parser.c braces staging: unisys: parser.c logical continuation drivers/staging/unisys/visorchipset/parser.c | 117 +++-- drivers/staging/unisys/visorchipset/parser.h | 29 ++--- .../unisys/visorchipset/visorchipset_main.c| 12 ++- 3 files changed, 81 insertions(+), 77 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/4] staging: unisys: uisutils.h and uisutils.c proc code
Left the functions "uisutil_add_proc_line_ex" in both files alone because they were declared in the files and not pulled from the proc header file. However the PROC_READ_BUFFER_SIZE was changed to READ_BUFFER_SIZE in the files. PROC_READ_BUFFER_SIZE => READ_BUFFER_SIZE Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/include/uisutils.h | 4 ++-- drivers/staging/unisys/uislib/uislib.c| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/include/uisutils.h b/drivers/staging/unisys/include/uisutils.h index 7414220..a202d76 100644 --- a/drivers/staging/unisys/include/uisutils.h +++ b/drivers/staging/unisys/include/uisutils.h @@ -108,8 +108,8 @@ dbg_iounmap(void __iomem *addr, char *file, int line) iounmap(addr); } -#define PROC_READ_BUFFER_SIZE 131072 /* size of the buffer to allocate to -* hold all of /proc/XXX/info */ +#define DEBUGFS_READ_BUFFER_SIZE 131072/* size of the buffer to allocate to +* hold all of /proc/XXX/info */ int uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining, char *format, ...); diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index 7c87452..5785eb3 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -1186,12 +1186,12 @@ info_debugfs_read(struct file *file, char __user *buf, { char *temp; int totalBytes = 0; - int remaining_bytes = PROC_READ_BUFFER_SIZE; + int remaining_bytes = DEBUGFS_READ_BUFFER_SIZE; /* *start = buf; */ if (ProcReadBuffer == NULL) { DBGINF("ProcReadBuffer == NULL; allocating buffer.\n."); - ProcReadBuffer = vmalloc(PROC_READ_BUFFER_SIZE); + ProcReadBuffer = vmalloc(DEBUGFS_READ_BUFFER_SIZE); if (ProcReadBuffer == NULL) { LOGERR("failed to allocate buffer to provide proc data.\n"); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging: unisys: visorchipset proc code
Removed proc code from visorchipset header and main. I also assume that code involving "process" is not the same as code involving "proc" Replaced two struct proc_dir_entrys and replaced them with voids struct proc_dir_entry *proc_dir => void reserved struct proc_dir_entry *proc_info => void reserved2 Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/include/uisqueue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/include/uisqueue.h b/drivers/staging/unisys/include/uisqueue.h index 25b6181..6ddc0bf 100644 --- a/drivers/staging/unisys/include/uisqueue.h +++ b/drivers/staging/unisys/include/uisqueue.h @@ -160,8 +160,8 @@ struct bus_info { uuid_le bus_inst_uuid; struct ultra_vbus_channel_protocol __iomem *bus_channel; int bus_channel_bytes; - struct proc_dir_entry *proc_dir;/* proc/uislib/vbus/ */ - struct proc_dir_entry *proc_info; /* proc/uislib/vbus//info */ + void *reserved; /* proc/uislib/vbus/ */ + void *reserved2;/* proc/uislib/vbus//info */ char name[25]; char partition_name[99]; struct bus_info *next; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 01/10] staging: unisys: parser_init camel cases
Fixed camel cases for parser_init isLocal => is_local tryAgain => try_again Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 4 ++-- drivers/staging/unisys/visorchipset/parser.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 9edbd3b..38264c6 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -155,9 +155,9 @@ Away: } PARSER_CONTEXT * -parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain) +parser_init(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) { - return parser_init_guts(addr, bytes, isLocal, TRUE, tryAgain); + return parser_init_guts(addr, bytes, is_local, TRUE, try_again); } /* Call this instead of parser_init() if the payload area consists of just diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index 9fbe3b5..4f26413 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -33,7 +33,8 @@ typedef enum { typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT; -PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain); +PARSER_CONTEXT *parser_init(u64 addr, u32 bytes, BOOL is_local, + BOOL *try_again); PARSER_CONTEXT *parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain); void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/10] staging: unisys: parser_init_byteStream camel case
Changed the camel cases for the struct parser_init_bytestream parser_init_byteStream => parser_init_bytestream isLocal => is_local tryAgain => try_again Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c| 4 ++-- drivers/staging/unisys/visorchipset/parser.h| 4 ++-- drivers/staging/unisys/visorchipset/visorchipset_main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 38264c6..8cd3b4f 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -166,9 +166,9 @@ parser_init(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) * parser_byteStream_get() to obtain the data. */ PARSER_CONTEXT * -parser_init_byteStream(u64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain) +parser_init_bytestream(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again) { - return parser_init_guts(addr, bytes, isLocal, FALSE, tryAgain); + return parser_init_guts(addr, bytes, is_local, FALSE, try_again); } /* Obtain '\0'-terminated copy of string in payload area. diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index 4f26413..10b922e 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -35,8 +35,8 @@ 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 isLocal, - BOOL *tryAgain); +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); diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index c8f7bea..5010c65 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1811,7 +1811,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) BOOL retry = FALSE; parser_ctx = - parser_init_byteStream(parametersAddr, parametersBytes, + parser_init_bytestream(parametersAddr, parametersBytes, isLocalAddr, &retry); if (!parser_ctx) { if (retry) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/10] staging: unisys: PARSER_WHICH_STRING typedef
Removed the typedef of PARSER_WHICH_STRING and replaced all instance of the typedef with enum parser_which_string. Also changed the name of it to parser_which_string PARSER_WHICH_STRING => parser_which_string Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 2 +- drivers/staging/unisys/visorchipset/parser.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 4a880b8..fad3fdb 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -211,7 +211,7 @@ parser_id_get(struct parser_context_tag *ctx) void parser_param_start(struct parser_context_tag *ctx, - PARSER_WHICH_STRING which_string) + enum parser_which_string which_string) { struct spar_controlvm_parameters_header *phdr = NULL; diff --git a/drivers/staging/unisys/visorchipset/parser.h b/drivers/staging/unisys/visorchipset/parser.h index de3f37b..5b802fc 100644 --- a/drivers/staging/unisys/visorchipset/parser.h +++ b/drivers/staging/unisys/visorchipset/parser.h @@ -24,12 +24,12 @@ #include "timskmod.h" #include "channel.h" -typedef enum { +enum parser_which_string { PARSERSTRING_INITIATOR, PARSERSTRING_TARGET, PARSERSTRING_CONNECTION, PARSERSTRING_NAME, -} PARSER_WHICH_STRING; +}; struct parser_context_tag *parser_init(u64 addr, u32 bytes, BOOL is_local, BOOL *try_again); @@ -37,7 +37,7 @@ 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); + enum 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); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/4] staging: unisys: timskmod proc code
This one was a little weird. I replaced all code implemented from the procobjecttree.h with debugfs code, then deleted procobjecttree.h and procobjecttree.c. After that I removed the Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/include/procobjecttree.h| 48 --- drivers/staging/unisys/include/timskmod.h | 1 - drivers/staging/unisys/visorchipset/visorchipset.h | 6 +- .../unisys/visorchipset/visorchipset_main.c| 7 +- drivers/staging/unisys/visorutil/procobjecttree.c | 352 - 5 files changed, 6 insertions(+), 408 deletions(-) delete mode 100644 drivers/staging/unisys/include/procobjecttree.h delete mode 100644 drivers/staging/unisys/visorutil/procobjecttree.c diff --git a/drivers/staging/unisys/include/procobjecttree.h b/drivers/staging/unisys/include/procobjecttree.h deleted file mode 100644 index 1174056..000 --- a/drivers/staging/unisys/include/procobjecttree.h +++ /dev/null @@ -1,48 +0,0 @@ -/* procobjecttree.h - * - * Copyright (C) 2010 - 2013 UNISYS CORPORATION - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or - * NON INFRINGEMENT. See the GNU General Public License for more - * details. - */ - -/** @file * - * - * This describes the interfaces necessary for creating a tree of types, - * objects, and properties in /proc. - * - ** - */ - -#ifndef __PROCOBJECTTREE_H__ -#define __PROCOBJECTTREE_H__ - -#include "uniklog.h" -#include "timskmod.h" - -/* These are opaque structures to users. - * Fields are declared only in the implementation .c files. - */ -typedef struct MYPROCOBJECT_Tag MYPROCOBJECT; -typedef struct MYPROCTYPE_Tag MYPROCTYPE; - -MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type, const char *name, - void *context); -void visor_proc_DestroyObject(MYPROCOBJECT *obj); -MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procRootDir, - const char **name, - const char **propertyNames, - void (*show_property)(struct seq_file *, - void *, int)); -void visor_proc_DestroyType(MYPROCTYPE *type); - -#endif diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h index de11f44..c47396e 100644 --- a/drivers/staging/unisys/include/timskmod.h +++ b/drivers/staging/unisys/include/timskmod.h @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorchipset/visorchipset.h index 46dad63..b794982 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset.h +++ b/drivers/staging/unisys/visorchipset/visorchipset.h @@ -24,7 +24,7 @@ #include "channel.h" #include "controlvmchannel.h" #include "parser.h" -#include "procobjecttree.h" +#include #include "vbusdeviceinfo.h" #include "vbushelper.h" @@ -133,7 +133,7 @@ struct visorchipset_bus_info { u8 *description;/* UTF8 */ u64 reserved1; u32 reserved2; - MYPROCOBJECT *proc_object; + struct dentry *debugfs_object; struct { u32 server:1; /* Add new fields above. */ @@ -209,7 +209,7 @@ struct visorchipset_internalport_info { u64 reserved1; u32 reserved2; /* CONTROLVM_ID */ struct controlvm_message_header pending_msg_hdr; - MYPROCOBJECT *proc_object; + struct dentry *debugfs_object; }; diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index c8f7bea..fa94e26 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -17,7 +17,6 @@ #include "globals.h" #include "visorchipset.h" -#include "procobjecttree.h" #include "visorchannel.h" #include "periodic_work.h" #include "testing.h" @@ -544,9 +543,9 @@ busInfo_clear(void *v) { struct visorchipset_bus_info *p = (struct visorchipset_bus_info *) (v); - if (p->proc_object) { - visor_proc_DestroyObject(p->proc_obj
[PATCH 06/10] staging: unisys: Controlvm_Payload_Bytes_Buffered camel case
Changed the camel case of the static ulong Controlvm_Payload_Bytes_ Buffered Controlvm_Payload_Bytes_Buffered =>controlvm_payload_bytes_buffered Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index fad3fdb..88abbeb 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -29,7 +29,7 @@ * incoming payloads. This serves as a throttling mechanism. */ #define MAX_CONTROLVM_PAYLOAD_BYTES (1024*128) -static ulong Controlvm_Payload_Bytes_Buffered; +static ulong controlvm_payload_bytes_buffered; struct parser_context_tag { ulong allocbytes; @@ -57,7 +57,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, * '\0'-terminated */ allocbytes++; - if ((Controlvm_Payload_Bytes_Buffered + bytes) + if ((controlvm_payload_bytes_buffered + bytes) > MAX_CONTROLVM_PAYLOAD_BYTES) { ERRDRV("%s (%s:%d) - prevented allocation of %d bytes to prevent exceeding throttling max (%d)", __func__, __FILE__, __LINE__, allocbytes, @@ -144,7 +144,7 @@ Away: rgn = NULL; } if (rc) - Controlvm_Payload_Bytes_Buffered += ctx->param_bytes; + controlvm_payload_bytes_buffered += ctx->param_bytes; else { if (ctx) { parser_done(ctx); @@ -252,7 +252,7 @@ parser_done(struct parser_context_tag *ctx) { if (!ctx) return; - Controlvm_Payload_Bytes_Buffered -= ctx->param_bytes; + controlvm_payload_bytes_buffered -= ctx->param_bytes; kfree(ctx); } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/10] staging: unisys: parser_init_guts and parser_param_start camel case
Fixed camel cases in the struct parser_init_guts and an Away camel case in parser_param_start isLocal => is_local tryAgain => try_again HasStandardPayloadHeader => has_standard_payload_header Away => cleanups Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 46 ++-- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 88abbeb..02cacec 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -41,8 +41,8 @@ struct parser_context_tag { }; static struct parser_context_tag * -parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, -BOOL hasStandardPayloadHeader, BOOL *tryAgain) +parser_init_guts(u64 addr, u32 bytes, BOOL is_local, +BOOL has_standard_payload_header, BOOL *try_again) { int allocbytes = sizeof(struct parser_context_tag) + bytes; struct parser_context_tag *rc = NULL; @@ -50,9 +50,9 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, struct memregion *rgn = NULL; struct spar_controlvm_parameters_header *phdr = NULL; - if (tryAgain) - *tryAgain = FALSE; - if (!hasStandardPayloadHeader) + if (try_again) + *try_again = FALSE; + if (!has_standard_payload_header) /* alloc and 0 extra byte to ensure payload is * '\0'-terminated */ @@ -62,19 +62,19 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, ERRDRV("%s (%s:%d) - prevented allocation of %d bytes to prevent exceeding throttling max (%d)", __func__, __FILE__, __LINE__, allocbytes, MAX_CONTROLVM_PAYLOAD_BYTES); - if (tryAgain) - *tryAgain = TRUE; + if (try_again) + *try_again = TRUE; rc = NULL; - goto Away; + goto cleanups; } ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); if (ctx == NULL) { ERRDRV("%s (%s:%d) - failed to allocate %d bytes", __func__, __FILE__, __LINE__, allocbytes); - if (tryAgain) - *tryAgain = TRUE; + if (try_again) + *try_again = TRUE; rc = NULL; - goto Away; + goto cleanups; } ctx->allocbytes = allocbytes; @@ -82,7 +82,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, ctx->curr = NULL; ctx->bytes_remaining = 0; ctx->byte_stream = FALSE; - if (isLocal) { + if (is_local) { void *p; if (addr > virt_to_phys(high_memory - 1)) { @@ -90,7 +90,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, __func__, (unsigned long long) addr, (ulong) bytes); rc = NULL; - goto Away; + goto cleanups; } p = __va((ulong) (addr)); memcpy(ctx->data, p, bytes); @@ -98,17 +98,17 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, rgn = visor_memregion_create(addr, bytes); if (!rgn) { rc = NULL; - goto Away; + goto cleanups; } if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) { rc = NULL; - goto Away; + goto cleanups; } } - if (!hasStandardPayloadHeader) { + if (!has_standard_payload_header) { ctx->byte_stream = TRUE; rc = ctx; - goto Away; + goto cleanups; } phdr = (struct spar_controlvm_parameters_header *)(ctx->data); if (phdr->total_length != bytes) { @@ -116,7 +116,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, __func__, (ulong) (phdr->total_length), (ulong) (bytes)); rc = NULL; - goto Away; + goto cleanups; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", @@ -124,7 +124,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal, (ulong) (phdr->total_length), (ulong) (phdr->header_length)); rc = NULL; - goto Away; + goto cleanups; } if (phdr->header_length < sizeof(struct spar_controlvm_parameters
[PATCH 4/4] staging: unisys: uislib.c proc code
Removed proc code from the file uislib.c, the main changes that removed the proc utility, was the defines, and the include statement in the beginning. CALLHOME_PROC_ENTRY_FN => CALLHOME_DEBUGFS_ENTRY_FN CALLHOME_THROTTLED_PROC_ENTRY_FN => CALLHOME_THROTTLED_PROC_ENTRY_FN ProcReadBufferValid => DebugfsReadBufferValid ProcReadBuffer => DebugfsReadBuffer Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/uislib/uislib.c | 36 +- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index 5785eb3..c176264 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -34,7 +34,7 @@ #include "uisutils.h" #include "vbuschannel.h" -#include +#include #include /* for copy_from_user */ #include/* for toupper */ #include @@ -45,7 +45,7 @@ #include "version.h" #include "guestlinuxdebug.h" -#define SET_PROC_OWNER(x, y) +#define SET_DEBUGFS_OWNER(x, y) #define POLLJIFFIES_NORMAL 1 /* Choose whether or not you want to wakeup the request-polling thread @@ -59,8 +59,8 @@ /* global function pointers that act as callback functions into virtpcimod */ int (*virt_control_chan_func)(struct guest_msgs *); -static int ProcReadBufferValid; -static char *ProcReadBuffer; /* Note this MUST be global, +static int DebugfsReadBufferValid; +static char *DebugfsReadBuffer;/* Note this MUST be global, * because the contents must */ static unsigned int chipset_inited; @@ -90,8 +90,8 @@ static DEFINE_SEMAPHORE(Lock_Polling_Device_Channels); /* unlocked */ static DECLARE_WAIT_QUEUE_HEAD(Wakeup_Polling_Device_Channels); static int Go_Polling_Device_Channels; -#define CALLHOME_PROC_ENTRY_FN "callhome" -#define CALLHOME_THROTTLED_PROC_ENTRY_FN "callhome_throttled" +#define CALLHOME_DEBUGFS_ENTRY_FN "callhome" +#define CALLHOME_THROTTLED_DEBUGFS_ENTRY_FN "callhome_throttled" #define DIR_DEBUGFS_ENTRY "uislib" static struct dentry *dir_debugfs; @@ -1189,28 +1189,28 @@ info_debugfs_read(struct file *file, char __user *buf, int remaining_bytes = DEBUGFS_READ_BUFFER_SIZE; /* *start = buf; */ - if (ProcReadBuffer == NULL) { - DBGINF("ProcReadBuffer == NULL; allocating buffer.\n."); - ProcReadBuffer = vmalloc(DEBUGFS_READ_BUFFER_SIZE); + if (DebugfsReadBuffer == NULL) { + DBGINF("DebugfsReadBuffer == NULL; allocating buffer.\n."); + DebugfsReadBuffer = vmalloc(DEBUGFS_READ_BUFFER_SIZE); - if (ProcReadBuffer == NULL) { + if (DebugfsReadBuffer == NULL) { LOGERR("failed to allocate buffer to provide proc data.\n"); return -ENOMEM; } } - temp = ProcReadBuffer; + temp = DebugfsReadBuffer; - if ((*offset == 0) || (!ProcReadBufferValid)) { + if ((*offset == 0) || (!DebugfsReadBufferValid)) { DBGINF("calling info_debugfs_read_helper.\n"); /* if the read fails, then -1 will be returned */ totalBytes = info_debugfs_read_helper(&temp, &remaining_bytes); - ProcReadBufferValid = 1; + DebugfsReadBufferValid = 1; } else - totalBytes = strlen(ProcReadBuffer); + totalBytes = strlen(DebugfsReadBuffer); return simple_read_from_buffer(buf, len, offset, - ProcReadBuffer, totalBytes); + DebugfsReadBuffer, totalBytes); } static struct device_info * @@ -1533,9 +1533,9 @@ uislib_mod_init(void) static void __exit uislib_mod_exit(void) { - if (ProcReadBuffer) { - vfree(ProcReadBuffer); - ProcReadBuffer = NULL; + if (DebugfsReadBuffer) { + vfree(DebugfsReadBuffer); + DebugfsReadBuffer = NULL; } debugfs_remove(info_debugfs_entry); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/10] staging: unisys: PARSER_CONTEXT typedef
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 --- 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
[PATCH 08/10] staging: unisys: parser.c space after casts
Removed all spaces after casts in parser.c Signed-off-by: Jeffrey Brown --- drivers/staging/unisys/visorchipset/parser.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 02cacec..17c1649 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -88,11 +88,11 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, if (addr > virt_to_phys(high_memory - 1)) { ERRDRV("%s - bad local address (0x%-16.16Lx for %lu)", __func__, - (unsigned long long) addr, (ulong) bytes); + (unsigned long long)addr, (ulong)bytes); rc = NULL; goto cleanups; } - p = __va((ulong) (addr)); + p = __va((ulong)(addr)); memcpy(ctx->data, p, bytes); } else { rgn = visor_memregion_create(addr, bytes); @@ -114,15 +114,15 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, if (phdr->total_length != bytes) { ERRDRV("%s - bad total length %lu (should be %lu)", __func__, - (ulong) (phdr->total_length), (ulong) (bytes)); + (ulong)(phdr->total_length), (ulong)(bytes)); rc = NULL; goto cleanups; } if (phdr->total_length < phdr->header_length) { ERRDRV("%s - total length < header length (%lu < %lu)", __func__, - (ulong) (phdr->total_length), - (ulong) (phdr->header_length)); + (ulong)(phdr->total_length), + (ulong)(phdr->header_length)); rc = NULL; goto cleanups; } @@ -130,7 +130,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL is_local, sizeof(struct spar_controlvm_parameters_header)) { ERRDRV("%s - header is too small (%lu < %lu)", __func__, - (ulong) (phdr->header_length), + (ulong)(phdr->header_length), (ulong)(sizeof( struct spar_controlvm_parameters_header))); rc = NULL; @@ -192,7 +192,7 @@ parser_bytestream_get(struct parser_context_tag *ctx, ulong *nbytes) return NULL; if (nbytes) *nbytes = ctx->param_bytes; - return (void *) ctx->data; + return (void *)ctx->data; } uuid_le @@ -407,7 +407,7 @@ parser_param_get(struct parser_context_tag *ctx, char *nam, int namesize) if (value == NULL) return NULL; memcpy(value, pscan, value_length); - ((u8 *) (value))[value_length] = '\0'; + ((u8 *)(value))[value_length] = '\0'; pscan += orig_value_length; nscan -= orig_value_length; @@ -475,6 +475,6 @@ parser_string_get(struct parser_context_tag *ctx) return NULL; if (value_length > 0) memcpy(value, pscan, value_length); - ((u8 *) (value))[value_length] = '\0'; + ((u8 *)(value))[value_length] = '\0'; return value; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel