Commit f4c11551 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: unisys: visorchipset: Get rid of ugly BOOL/TRUE/FALSE usage

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c1f834eb
...@@ -36,13 +36,13 @@ struct parser_context { ...@@ -36,13 +36,13 @@ struct parser_context {
ulong param_bytes; ulong param_bytes;
u8 *curr; u8 *curr;
ulong bytes_remaining; ulong bytes_remaining;
BOOL byte_stream; bool byte_stream;
char data[0]; char data[0];
}; };
static struct parser_context * static struct parser_context *
parser_init_guts(u64 addr, u32 bytes, BOOL local, parser_init_guts(u64 addr, u32 bytes, bool local,
BOOL standard_payload_header, BOOL *retry) bool standard_payload_header, bool *retry)
{ {
int allocbytes = sizeof(struct parser_context) + bytes; int allocbytes = sizeof(struct parser_context) + bytes;
struct parser_context *rc = NULL; struct parser_context *rc = NULL;
...@@ -51,7 +51,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -51,7 +51,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
struct spar_controlvm_parameters_header *phdr = NULL; struct spar_controlvm_parameters_header *phdr = NULL;
if (retry) if (retry)
*retry = FALSE; *retry = false;
if (!standard_payload_header) if (!standard_payload_header)
/* alloc and 0 extra byte to ensure payload is /* alloc and 0 extra byte to ensure payload is
* '\0'-terminated * '\0'-terminated
...@@ -60,14 +60,14 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -60,14 +60,14 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
if ((controlvm_payload_bytes_buffered + bytes) if ((controlvm_payload_bytes_buffered + bytes)
> MAX_CONTROLVM_PAYLOAD_BYTES) { > MAX_CONTROLVM_PAYLOAD_BYTES) {
if (retry) if (retry)
*retry = TRUE; *retry = true;
rc = NULL; rc = NULL;
goto cleanup; goto cleanup;
} }
ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY); ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY);
if (!ctx) { if (!ctx) {
if (retry) if (retry)
*retry = TRUE; *retry = true;
rc = NULL; rc = NULL;
goto cleanup; goto cleanup;
} }
...@@ -76,7 +76,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -76,7 +76,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
ctx->param_bytes = bytes; ctx->param_bytes = bytes;
ctx->curr = NULL; ctx->curr = NULL;
ctx->bytes_remaining = 0; ctx->bytes_remaining = 0;
ctx->byte_stream = FALSE; ctx->byte_stream = false;
if (local) { if (local) {
void *p; void *p;
...@@ -98,7 +98,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -98,7 +98,7 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
} }
} }
if (!standard_payload_header) { if (!standard_payload_header) {
ctx->byte_stream = TRUE; ctx->byte_stream = true;
rc = ctx; rc = ctx;
goto cleanup; goto cleanup;
} }
...@@ -135,9 +135,9 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local, ...@@ -135,9 +135,9 @@ parser_init_guts(u64 addr, u32 bytes, BOOL local,
} }
struct parser_context * struct parser_context *
parser_init(u64 addr, u32 bytes, BOOL local, BOOL *retry) parser_init(u64 addr, u32 bytes, bool local, bool *retry)
{ {
return parser_init_guts(addr, bytes, local, TRUE, retry); return parser_init_guts(addr, bytes, local, true, retry);
} }
/* Call this instead of parser_init() if the payload area consists of just /* Call this instead of parser_init() if the payload area consists of just
...@@ -146,9 +146,9 @@ parser_init(u64 addr, u32 bytes, BOOL local, BOOL *retry) ...@@ -146,9 +146,9 @@ parser_init(u64 addr, u32 bytes, BOOL local, BOOL *retry)
* parser_byteStream_get() to obtain the data. * parser_byteStream_get() to obtain the data.
*/ */
struct parser_context * struct parser_context *
parser_init_byte_stream(u64 addr, u32 bytes, BOOL local, BOOL *retry) parser_init_byte_stream(u64 addr, u32 bytes, bool local, bool *retry)
{ {
return parser_init_guts(addr, bytes, local, FALSE, retry); return parser_init_guts(addr, bytes, local, false, retry);
} }
/* Obtain '\0'-terminated copy of string in payload area. /* Obtain '\0'-terminated copy of string in payload area.
......
...@@ -30,10 +30,10 @@ typedef enum { ...@@ -30,10 +30,10 @@ typedef enum {
PARSERSTRING_NAME, PARSERSTRING_NAME,
} PARSER_WHICH_STRING; } PARSER_WHICH_STRING;
struct parser_context *parser_init(u64 addr, u32 bytes, BOOL isLocal, struct parser_context *parser_init(u64 addr, u32 bytes, bool isLocal,
BOOL *tryAgain); bool *tryAgain);
struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes, BOOL local, struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes, bool local,
BOOL *retry); bool *retry);
void parser_param_start(struct parser_context *ctx, void parser_param_start(struct parser_context *ctx,
PARSER_WHICH_STRING which_string); PARSER_WHICH_STRING which_string);
void *parser_param_get(struct parser_context *ctx, char *nam, int namesize); void *parser_param_get(struct parser_context *ctx, char *nam, int namesize);
......
...@@ -217,19 +217,19 @@ typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (struct controlvm_message *msg, ...@@ -217,19 +217,19 @@ typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (struct controlvm_message *msg,
void visorchipset_device_pause_response(ulong bus_no, ulong dev_no, void visorchipset_device_pause_response(ulong bus_no, ulong dev_no,
int response); int response);
BOOL visorchipset_get_bus_info(ulong bus_no, bool visorchipset_get_bus_info(ulong bus_no,
struct visorchipset_bus_info *bus_info); struct visorchipset_bus_info *bus_info);
BOOL visorchipset_get_device_info(ulong bus_no, ulong dev_no, bool visorchipset_get_device_info(ulong bus_no, ulong dev_no,
struct visorchipset_device_info *dev_info); struct visorchipset_device_info *dev_info);
BOOL visorchipset_set_bus_context(ulong bus_no, void *context); bool visorchipset_set_bus_context(ulong bus_no, void *context);
BOOL visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context); bool visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context);
int visorchipset_chipset_ready(void); int visorchipset_chipset_ready(void);
int visorchipset_chipset_selftest(void); int visorchipset_chipset_selftest(void);
int visorchipset_chipset_notready(void); int visorchipset_chipset_notready(void);
void visorchipset_save_message(struct controlvm_message *msg, void visorchipset_save_message(struct controlvm_message *msg,
enum crash_obj_type type); enum crash_obj_type type);
void *visorchipset_cache_alloc(struct kmem_cache *pool, void *visorchipset_cache_alloc(struct kmem_cache *pool,
BOOL ok_to_block, char *fn, int ln); bool ok_to_block, char *fn, int ln);
void visorchipset_cache_free(struct kmem_cache *pool, void *p, void visorchipset_cache_free(struct kmem_cache *pool, void *p,
char *fn, int ln); char *fn, int ln);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment